Skip to content

Fix cryptography WithSerialization aliases #8239

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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