aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Cipher/ChaCha20.py
diff options
context:
space:
mode:
authorDeterminant <[email protected]>2024-08-23 03:14:03 +0000
committerDeterminant <[email protected]>2024-08-22 20:34:57 -0700
commit8d1c76ec7caf247d5675e14260d20fc508977ffb (patch)
tree8fa7c8ce3b7e3f4ece150a6da5922b5eb2dc7772 /frozen_deps/Cryptodome/Cipher/ChaCha20.py
parent258780284151d49cba1d9c0d2ce33f9a19bb058b (diff)
release v0.1.8
Diffstat (limited to 'frozen_deps/Cryptodome/Cipher/ChaCha20.py')
-rw-r--r--frozen_deps/Cryptodome/Cipher/ChaCha20.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/frozen_deps/Cryptodome/Cipher/ChaCha20.py b/frozen_deps/Cryptodome/Cipher/ChaCha20.py
index b4f8b5f..648d692 100644
--- a/frozen_deps/Cryptodome/Cipher/ChaCha20.py
+++ b/frozen_deps/Cryptodome/Cipher/ChaCha20.py
@@ -106,7 +106,7 @@ class ChaCha20Cipher(object):
self._name = "ChaCha20"
nonce = self.nonce
- self._next = ( self.encrypt, self.decrypt )
+ self._next = ("encrypt", "decrypt")
self._state = VoidPointer()
result = _raw_chacha20_lib.chacha20_init(
@@ -134,9 +134,9 @@ class ChaCha20Cipher(object):
Otherwise, ``None``.
"""
- if self.encrypt not in self._next:
+ if "encrypt" not in self._next:
raise TypeError("Cipher object can only be used for decryption")
- self._next = ( self.encrypt, )
+ self._next = ("encrypt",)
return self._encrypt(plaintext, output)
def _encrypt(self, plaintext, output):
@@ -180,9 +180,9 @@ class ChaCha20Cipher(object):
Otherwise, ``None``.
"""
- if self.decrypt not in self._next:
+ if "decrypt" not in self._next:
raise TypeError("Cipher object can only be used for encryption")
- self._next = ( self.decrypt, )
+ self._next = ("decrypt",)
try:
return self._encrypt(ciphertext, output)