aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Cipher/ChaCha20.py
diff options
context:
space:
mode:
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)