aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-19 15:01:44 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-06-19 15:01:44 -0600
commited5a12429ee9683384631d063818e9859a5a28a8 (patch)
treeffa1ec0fbcc2555cbc4d6a9ca0733e20cb5f249f
parente3a5e67fef86758d03308695e3a4da1b444cac8c (diff)
downloadcryptography-ed5a12429ee9683384631d063818e9859a5a28a8.tar.gz
cryptography-ed5a12429ee9683384631d063818e9859a5a28a8.tar.bz2
cryptography-ed5a12429ee9683384631d063818e9859a5a28a8.zip
add missing interface methods on ABCs
These methods are present in the docs but not the actual interfaces.
-rw-r--r--cryptography/hazmat/primitives/interfaces.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py
index 682a36da..33af438a 100644
--- a/cryptography/hazmat/primitives/interfaces.py
+++ b/cryptography/hazmat/primitives/interfaces.py
@@ -191,6 +191,12 @@ class RSAPrivateKey(object):
Returns an AsymmetricSignatureContext used for signing data.
"""
+ @abc.abstractmethod
+ def decrypt(self, ciphertext, padding):
+ """
+ Decrypts the provided ciphertext.
+ """
+
@abc.abstractproperty
def key_size(self):
"""
@@ -220,6 +226,12 @@ class RSAPublicKey(object):
Returns an AsymmetricVerificationContext used for verifying signatures.
"""
+ @abc.abstractmethod
+ def encrypt(self, plaintext, padding):
+ """
+ Encrypts the given plaintext.
+ """
+
@abc.abstractproperty
def key_size(self):
"""