mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
cryptography: Make mode in Cipher.__init__ optional (#3751)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from abc import ABCMeta, abstractmethod
|
||||
from typing import Optional
|
||||
|
||||
from cryptography.hazmat.backends.interfaces import CipherBackend
|
||||
from cryptography.hazmat.primitives.ciphers.modes import Mode
|
||||
@@ -22,7 +23,7 @@ class BlockCipherAlgorithm(metaclass=ABCMeta):
|
||||
def block_size(self) -> int: ...
|
||||
|
||||
class Cipher(object):
|
||||
def __init__(self, algorithm: CipherAlgorithm, mode: Mode, backend: CipherBackend) -> None: ...
|
||||
def __init__(self, algorithm: CipherAlgorithm, mode: Optional[Mode], backend: CipherBackend) -> None: ...
|
||||
def decryptor(self) -> CipherContext: ...
|
||||
def encryptor(self) -> CipherContext: ...
|
||||
|
||||
|
||||
Reference in New Issue
Block a user