mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
cyptography: Add default to few remaining backend= arguments (#4982)
This was changed in cryptography 3.1. Most places in typeshed were already correct, fixed few remaining omissions.
This commit is contained in:
@@ -28,7 +28,7 @@ def load_der_public_key(
|
||||
data: bytes, backend: Optional[DERSerializationBackend] = ...
|
||||
) -> Any: ... # actually Union[RSAPublicKey, DSAPublicKey, DHPublicKey, EllipticCurvePublicKey]
|
||||
def load_ssh_public_key(
|
||||
data: bytes, backend: Union[RSABackend, DSABackend, EllipticCurveBackend, None]
|
||||
data: bytes, backend: Union[RSABackend, DSABackend, EllipticCurveBackend, None] = ...
|
||||
) -> Any: ... # actually Union[RSAPublicKey, DSAPublicKey, DHPublicKey, EllipticCurvePublicKey, Ed25519PublicKey]
|
||||
|
||||
class Encoding(Enum):
|
||||
|
||||
@@ -5,7 +5,12 @@ from cryptography.hazmat.primitives.hashes import HashAlgorithm
|
||||
|
||||
class HOTP(object):
|
||||
def __init__(
|
||||
self, key: bytes, length: int, algorithm: HashAlgorithm, backend: HMACBackend, enforce_key_length: bool = ...
|
||||
self,
|
||||
key: bytes,
|
||||
length: int,
|
||||
algorithm: HashAlgorithm,
|
||||
backend: Optional[HMACBackend] = ...,
|
||||
enforce_key_length: bool = ...,
|
||||
): ...
|
||||
def generate(self, counter: int) -> bytes: ...
|
||||
def get_provisioning_uri(self, account_name: str, counter: int, issuer: Optional[str]) -> str: ...
|
||||
|
||||
@@ -10,7 +10,7 @@ class TOTP(object):
|
||||
length: int,
|
||||
algorithm: HashAlgorithm,
|
||||
time_step: int,
|
||||
backend: HMACBackend,
|
||||
backend: Optional[HMACBackend] = ...,
|
||||
enforce_key_length: bool = ...,
|
||||
): ...
|
||||
def generate(self, time: int) -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user