diff options
author | Determinant <[email protected]> | 2024-08-23 03:14:03 +0000 |
---|---|---|
committer | Determinant <[email protected]> | 2024-08-22 20:34:57 -0700 |
commit | 8d1c76ec7caf247d5675e14260d20fc508977ffb (patch) | |
tree | 8fa7c8ce3b7e3f4ece150a6da5922b5eb2dc7772 /frozen_deps/Cryptodome/Hash/cSHAKE128.py | |
parent | 258780284151d49cba1d9c0d2ce33f9a19bb058b (diff) |
release v0.1.8
Diffstat (limited to 'frozen_deps/Cryptodome/Hash/cSHAKE128.py')
-rw-r--r-- | frozen_deps/Cryptodome/Hash/cSHAKE128.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/frozen_deps/Cryptodome/Hash/cSHAKE128.py b/frozen_deps/Cryptodome/Hash/cSHAKE128.py index 7c2f30a..064b3d6 100644 --- a/frozen_deps/Cryptodome/Hash/cSHAKE128.py +++ b/frozen_deps/Cryptodome/Hash/cSHAKE128.py @@ -28,7 +28,7 @@ # POSSIBILITY OF SUCH DAMAGE. # =================================================================== -from Cryptodome.Util.py3compat import bchr +from Cryptodome.Util.py3compat import bchr, concat_buffers from Cryptodome.Util._raw_api import (VoidPointer, SmartPointer, create_string_buffer, @@ -69,13 +69,13 @@ def _encode_str(x): if bitlen >= (1 << 2040): raise ValueError("String too large to encode in cSHAKE") - return _left_encode(bitlen) + x + return concat_buffers(_left_encode(bitlen), x) def _bytepad(x, length): """Zero pad byte string as defined in NIST SP 800-185""" - to_pad = _left_encode(length) + x + to_pad = concat_buffers(_left_encode(length), x) # Note: this implementation works with byte aligned strings, # hence no additional bit padding is needed at this point. |