We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f261f94 commit 9eddec4Copy full SHA for 9eddec4
crypto/ChaCha20.py
@@ -88,6 +88,8 @@ def _apply_keystream(self, data: bytes) -> bytes:
88
bytes: The result of XORing the input data with the ChaCha20 keystream
89
(ciphertext if plaintext was provided, plaintext if ciphertext was provided).
90
"""
91
+ if len(data) == 0:
92
+ return b""
93
result = b""
94
chunk_size = 64
95
start = 0
0 commit comments