cryptography: Make mode in Cipher.__init__ optional (#3751)

This commit is contained in:
Jaromir Latal
2020-02-22 04:49:04 +00:00
committed by GitHub
parent 830295074c
commit 7b38214280

View File

@@ -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: ...