diff options
| author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-06-07 17:04:13 -0500 |
|---|---|---|
| committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-06-07 17:04:13 -0500 |
| commit | f0a48c6916bf7963dc27043401a73a685943a16c (patch) | |
| tree | c48209c11f9a36f1262e730fe44b6fd42af5756b /cryptography | |
| parent | 48fe4151b03cd15098d72e2ed394fd08085803f0 (diff) | |
| download | cryptography-f0a48c6916bf7963dc27043401a73a685943a16c.tar.gz cryptography-f0a48c6916bf7963dc27043401a73a685943a16c.tar.bz2 cryptography-f0a48c6916bf7963dc27043401a73a685943a16c.zip | |
change to sub-interface idea
Diffstat (limited to 'cryptography')
| -rw-r--r-- | cryptography/hazmat/primitives/interfaces.py | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/cryptography/hazmat/primitives/interfaces.py b/cryptography/hazmat/primitives/interfaces.py index e827271f..682a36da 100644 --- a/cryptography/hazmat/primitives/interfaces.py +++ b/cryptography/hazmat/primitives/interfaces.py @@ -205,6 +205,14 @@ class RSAPrivateKey(object): @six.add_metaclass(abc.ABCMeta) +class RSAPrivateKeyWithNumbers(RSAPrivateKey): + def private_numbers(self): + """ + Returns an RSAPrivateNumbers. + """ + + +@six.add_metaclass(abc.ABCMeta) class RSAPublicKey(object): @abc.abstractmethod def verifier(self, signature, padding, algorithm, backend): @@ -220,6 +228,14 @@ class RSAPublicKey(object): @six.add_metaclass(abc.ABCMeta) +class RSAPublicKeyWithNumbers(RSAPublicKey): + def public_numbers(self): + """ + Returns an RSAPublicNumbers + """ + + +@six.add_metaclass(abc.ABCMeta) class DSAParameters(object): @abc.abstractproperty def modulus(self): @@ -455,19 +471,3 @@ class EllipticCurvePublicKey(object): """ The EllipticCurve that this key is on. """ - - -@six.add_metaclass(abc.ABCMeta) -class RSAPrivateNumbersAvailable(object): - def private_numbers(self): - """ - Returns an RSAPrivateNumbers. - """ - - -@six.add_metaclass(abc.ABCMeta) -class RSAPublicNumbersAvailable(object): - def public_numbers(self): - """ - Returns an RSAPublicNumbers - """ |
