From ed5a12429ee9683384631d063818e9859a5a28a8 Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Thu, 19 Jun 2014 15:01:44 -0600 Subject: add missing interface methods on ABCs These methods are present in the docs but not the actual interfaces. --- cryptography/hazmat/primitives/interfaces.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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): """ -- cgit v1.2.3