mirror of
https://github.com/bitcoin/bips.git
synced 2026-11-23 19:54:28 +00:00
Update reference.py
This commit is contained in:
1 parent
3ccc59dbdb
commit
54c39b27b9
1 file changed
+1
-1
@@ -566,7 +566,7 @@ class FSChaCha20:
|
|||||||
return ret
|
return ret
|
||||||
|
|
||||||
def crypt(self, chunk):
|
def crypt(self, chunk):
|
||||||
"""Encrypt or decypt chunk."""
|
"""Encrypt or decrypt chunk."""
|
||||||
ks = self.get_keystream_bytes(len(chunk))
|
ks = self.get_keystream_bytes(len(chunk))
|
||||||
ret = bytes([ks[i] ^ chunk[i] for i in range(len(chunk))])
|
ret = bytes([ks[i] ^ chunk[i] for i in range(len(chunk))])
|
||||||
if ((self.chunk_counter + 1) % REKEY_INTERVAL) == 0:
|
if ((self.chunk_counter + 1) % REKEY_INTERVAL) == 0:
|
||||||
|
|||||||
Reference in new issue
Block a user