Skip to content

Commit

Permalink
Fix cryptography WithSerialization aliases
Browse files Browse the repository at this point in the history
Align with changes in pyca/cryptography@6a8c0b5
  • Loading branch information
hasier committed Jul 5, 2022
1 parent 54e006c commit 592707b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ class DSAPrivateKey(metaclass=ABCMeta):
def public_key(self) -> DSAPublicKey: ...
@abstractmethod
def sign(self, data: bytes, algorithm: HashAlgorithm | Prehashed) -> bytes: ...

class DSAPrivateKeyWithSerialization(DSAPrivateKey):
@abstractmethod
def private_bytes(
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
) -> bytes: ...
@abstractmethod
def private_numbers(self) -> DSAPrivateNumbers: ...

DSAPrivateKeyWithSerialization = DSAPrivateKey

class DSAPrivateNumbers:
@property
def x(self) -> int: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ class EllipticCurvePrivateKey(metaclass=ABCMeta):
def public_key(self) -> EllipticCurvePublicKey: ...
@abstractmethod
def sign(self, data: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> bytes: ...

class EllipticCurvePrivateKeyWithSerialization(EllipticCurvePrivateKey):
@abstractmethod
def private_bytes(
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
) -> bytes: ...
@abstractmethod
def private_numbers(self) -> EllipticCurvePrivateNumbers: ...

EllipticCurvePrivateKeyWithSerialization = EllipticCurvePrivateKey

class EllipticCurvePrivateNumbers:
@property
def private_value(self) -> int: ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class RSAPrivateKey(metaclass=ABCMeta):
def public_key(self) -> RSAPublicKey: ...
@abstractmethod
def sign(self, data: bytes, padding: AsymmetricPadding, algorithm: HashAlgorithm | Prehashed) -> bytes: ...

class RSAPrivateKeyWithSerialization(RSAPrivateKey):
@abstractmethod
def private_bytes(
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
) -> bytes: ...
@abstractmethod
def private_numbers(self) -> RSAPrivateNumbers: ...

RSAPrivateKeyWithSerialization = RSAPrivateKey

class RSAPublicKey(metaclass=ABCMeta):
@property
@abstractmethod
Expand Down

0 comments on commit 592707b

Please sign in to comment.