We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b5ab5b0 commit a82393bCopy full SHA for a82393b
1 file changed
wolfcrypt/ciphers.py
@@ -191,6 +191,7 @@ def encrypt(self, string):
191
self._enc = _ffi.new(self._native_type)
192
ret = self._set_key(_ENCRYPTION)
193
if ret < 0: # pragma: no cover
194
+ self._enc = None
195
raise WolfCryptError("Invalid key error (%d)" % ret)
196
197
result = _ffi.new("byte[%d]" % len(string))
@@ -224,6 +225,7 @@ def decrypt(self, string):
224
225
self._dec = _ffi.new(self._native_type)
226
ret = self._set_key(_DECRYPTION)
227
228
+ self._dec = None
229
230
231
0 commit comments