diff options
author | Aviv Palivoda <palaviv@gmail.com> | 2016-06-30 21:42:46 +0300 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2016-06-30 13:42:46 -0500 |
commit | f67429b9d199931eb695524724a947847ed1f808 (patch) | |
tree | 6cf38e2a2fdf93074964264963ba575722cb9ea2 /src/cryptography/hazmat/primitives/asymmetric | |
parent | 602f88f35dfda15c031de0dce5305e4850df7e07 (diff) | |
download | cryptography-f67429b9d199931eb695524724a947847ed1f808.tar.gz cryptography-f67429b9d199931eb695524724a947847ed1f808.tar.bz2 cryptography-f67429b9d199931eb695524724a947847ed1f808.zip |
One shot sign/verify DSA (#3003)
* Add sign and verify methods to DSA
* Documented DSA sign/verify methods
* Added CHANGELOG entry
Diffstat (limited to 'src/cryptography/hazmat/primitives/asymmetric')
-rw-r--r-- | src/cryptography/hazmat/primitives/asymmetric/dsa.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cryptography/hazmat/primitives/asymmetric/dsa.py b/src/cryptography/hazmat/primitives/asymmetric/dsa.py index 511d3464..03e6a53e 100644 --- a/src/cryptography/hazmat/primitives/asymmetric/dsa.py +++ b/src/cryptography/hazmat/primitives/asymmetric/dsa.py @@ -55,6 +55,12 @@ class DSAPrivateKey(object): Returns an AsymmetricSignatureContext used for signing data. """ + @abc.abstractmethod + def sign(self, data, algorithm): + """ + Signs the data + """ + @six.add_metaclass(abc.ABCMeta) class DSAPrivateKeyWithSerialization(DSAPrivateKey): @@ -103,6 +109,12 @@ class DSAPublicKey(object): Returns the key serialized as bytes. """ + @abc.abstractmethod + def verify(self, signature, data, algorithm): + """ + Verifies the signature of the data. + """ + DSAPublicKeyWithSerialization = DSAPublicKey |