-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix GH#705: nonce parameter can be explicitly None (typing) for CAST …
…and ARC2/4
- Loading branch information
Showing
4 changed files
with
23 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,14 @@ | ||
from typing import Any, Union, Iterable | ||
|
||
Buffer = Union[bytes, bytearray, memoryview] | ||
from typing import Any, Union, Iterable, ByteString | ||
|
||
class ARC4Cipher: | ||
block_size: int | ||
key_size: int | ||
|
||
def __init__(self, key: Buffer, *args: Any, **kwargs: Any) -> None: ... | ||
def encrypt(self, plaintext: Buffer) -> bytes: ... | ||
def decrypt(self, ciphertext: Buffer) -> bytes: ... | ||
def __init__(self, key: ByteString, *args: Any, **kwargs: Any) -> None: ... | ||
def encrypt(self, plaintext: ByteString) -> bytes: ... | ||
def decrypt(self, ciphertext: ByteString) -> bytes: ... | ||
|
||
def new(key: Buffer, drop : int = ...) -> ARC4Cipher: ... | ||
def new(key: ByteString, drop : int = ...) -> ARC4Cipher: ... | ||
|
||
block_size: int | ||
key_size: Iterable[int] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters