aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGibheer <gibheer@gmail.com>2015-02-19 21:50:07 +0100
committerGibheer <gibheer@gmail.com>2015-02-19 21:50:07 +0100
commit2fa7332719bafb33ad6cb212f9c567b23ed4082d (patch)
tree3cb411607201dc041cf30a3d43fa2fe5d63164de
parent80db488cbdbd7a35f61526f8581d806849703298 (diff)
add documentation to rsa functions
-rw-r--r--rsa.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/rsa.go b/rsa.go
index 1661163..410b9f7 100644
--- a/rsa.go
+++ b/rsa.go
@@ -56,10 +56,12 @@ func (pr RsaPrivateKey) MarshalPem() (marshalledPemBlock, error) {
return pem.EncodeToMemory(&pem_block), nil
}
+// restore a rsa public key
func LoadPublicKeyRsa(raw []byte) (*RsaPublicKey, error) {
return nil, errors.New("not implemented yet!")
}
+// marshal a rsa public key into pem format
func (pu *RsaPublicKey) MarshalPem() (marshalledPemBlock, error) {
asn1, err := x509.MarshalPKIXPublicKey(pu.public_key)
if err != nil { return nil, err }
@@ -67,6 +69,7 @@ func (pu *RsaPublicKey) MarshalPem() (marshalledPemBlock, error) {
return pem.EncodeToMemory(&pem_block), nil
}
+// verify a message with a signature using the public key
func (pu *RsaPublicKey) Verify(message []byte, signature []byte, hash crypto.Hash) (bool, error) {
return false, errors.New("not implemented yet!")
}