2018-09-30 02:30:33 +02:00
|
|
|
from typing import Union
|
2018-11-08 22:03:40 +01:00
|
|
|
from Crypto.Util._raw_api import SmartPointer
|
2018-09-30 02:30:33 +02:00
|
|
|
|
|
|
|
|
__all__ = ['CtrMode']
|
|
|
|
|
|
|
|
|
|
class CtrMode(object):
|
|
|
|
|
nonce: bytes
|
|
|
|
|
block_size: int
|
|
|
|
|
def __init__(self, block_cipher: SmartPointer, initial_counter_block: Union[bytes, bytearray, memoryview],
|
|
|
|
|
prefix_len: int, counter_len: int, little_endian: bool) -> None: ...
|
|
|
|
|
def encrypt(self, plaintext: Union[bytes, bytearray, memoryview]) -> bytes: ...
|
2018-11-08 22:03:40 +01:00
|
|
|
def decrypt(self, ciphertext: Union[bytes, bytearray, memoryview]) -> bytes: ...
|