Skip to content

Commit 592707b

Browse files
committed
Fix cryptography WithSerialization aliases
Align with changes in pyca/cryptography@6a8c0b5
1 parent 54e006c commit 592707b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

stubs/cryptography/cryptography/hazmat/primitives/asymmetric/dsa.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ class DSAPrivateKey(metaclass=ABCMeta):
3434
def public_key(self) -> DSAPublicKey: ...
3535
@abstractmethod
3636
def sign(self, data: bytes, algorithm: HashAlgorithm | Prehashed) -> bytes: ...
37-
38-
class DSAPrivateKeyWithSerialization(DSAPrivateKey):
3937
@abstractmethod
4038
def private_bytes(
4139
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
4240
) -> bytes: ...
4341
@abstractmethod
4442
def private_numbers(self) -> DSAPrivateNumbers: ...
4543

44+
DSAPrivateKeyWithSerialization = DSAPrivateKey
45+
4646
class DSAPrivateNumbers:
4747
@property
4848
def x(self) -> int: ...

stubs/cryptography/cryptography/hazmat/primitives/asymmetric/ec.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ class EllipticCurvePrivateKey(metaclass=ABCMeta):
127127
def public_key(self) -> EllipticCurvePublicKey: ...
128128
@abstractmethod
129129
def sign(self, data: bytes, signature_algorithm: EllipticCurveSignatureAlgorithm) -> bytes: ...
130-
131-
class EllipticCurvePrivateKeyWithSerialization(EllipticCurvePrivateKey):
132130
@abstractmethod
133131
def private_bytes(
134132
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
135133
) -> bytes: ...
136134
@abstractmethod
137135
def private_numbers(self) -> EllipticCurvePrivateNumbers: ...
138136

137+
EllipticCurvePrivateKeyWithSerialization = EllipticCurvePrivateKey
138+
139139
class EllipticCurvePrivateNumbers:
140140
@property
141141
def private_value(self) -> int: ...

stubs/cryptography/cryptography/hazmat/primitives/asymmetric/rsa.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@ class RSAPrivateKey(metaclass=ABCMeta):
1717
def public_key(self) -> RSAPublicKey: ...
1818
@abstractmethod
1919
def sign(self, data: bytes, padding: AsymmetricPadding, algorithm: HashAlgorithm | Prehashed) -> bytes: ...
20-
21-
class RSAPrivateKeyWithSerialization(RSAPrivateKey):
2220
@abstractmethod
2321
def private_bytes(
2422
self, encoding: Encoding, format: PrivateFormat, encryption_algorithm: KeySerializationEncryption
2523
) -> bytes: ...
2624
@abstractmethod
2725
def private_numbers(self) -> RSAPrivateNumbers: ...
2826

27+
RSAPrivateKeyWithSerialization = RSAPrivateKey
28+
2929
class RSAPublicKey(metaclass=ABCMeta):
3030
@property
3131
@abstractmethod

0 commit comments

Comments
 (0)