From 639a5379e9abf4a3f0d88464d1a229f8d5df14ae Mon Sep 17 00:00:00 2001 From: Gibheer Date: Wed, 18 Feb 2015 22:55:29 +0100 Subject: add sign and verification to ecdsa This commit adds support to sign and verify messages using ecdsa. --- rsa.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rsa.go') diff --git a/rsa.go b/rsa.go index 71acd55..9a4f298 100644 --- a/rsa.go +++ b/rsa.go @@ -41,7 +41,7 @@ func (pr *RsaPrivateKey) Public() PublicKey { return &RsaPublicKey{pr.private_key.Public().(*rsa.PublicKey)} } -func (pr RsaPrivateKey) Sign(message []byte) ([]byte, error) { +func (pr RsaPrivateKey) Sign(message []byte, hash crypto.Hash) ([]byte, error) { return make([]byte, 0), errors.New("not implemented yet!") } @@ -63,6 +63,6 @@ func (pu *RsaPublicKey) MarshalPem() (marshalledPemBlock, error) { return pem.EncodeToMemory(&pem_block), nil } -func (pu *RsaPublicKey) Verify(message []byte, signature []byte) (bool, error) { +func (pu *RsaPublicKey) Verify(message []byte, signature []byte, hash crypto.Hash) (bool, error) { return false, errors.New("not implemented yet!") } -- cgit v1.2.3-70-g09d2