| 1 | from typing import Union, Tuple, Optional, overload, Optional |
| 2 | |
| 3 | Buffer = bytes|bytearray|memoryview |
| 4 | |
| 5 | class Salsa20Cipher: |
| 6 | nonce: bytes |
| 7 | block_size: int |
| 8 | key_size: int |
| 9 | |
| 10 | def __init__(self, |
| 11 | key: Buffer, |
| 12 | nonce: Buffer) -> None: ... |
| 13 | @overload |
| 14 | def encrypt(self, plaintext: Buffer) -> bytes: ... |
| 15 | @overload |
| 16 | def encrypt(self, plaintext: Buffer, output: Union[bytearray, memoryview]) -> None: ... |
| 17 | @overload |
| 18 | def decrypt(self, plaintext: Buffer) -> bytes: ... |
| 19 | @overload |
| 20 | def decrypt(self, plaintext: Buffer, output: Union[bytearray, memoryview]) -> None: ... |
| 21 | |
| 22 | def new(key: Buffer, nonce: Optional[Buffer] = ...) -> Salsa20Cipher: ... |
| 23 | |
| 24 | block_size: int |
| 25 | key_size: Tuple[int, int] |
| 26 |