From 8d1c76ec7caf247d5675e14260d20fc508977ffb Mon Sep 17 00:00:00 2001 From: Determinant Date: Fri, 23 Aug 2024 03:14:03 +0000 Subject: release v0.1.8 --- frozen_deps/Cryptodome/Hash/cSHAKE128.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'frozen_deps/Cryptodome/Hash/cSHAKE128.py') 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. -- cgit v1.2.3-70-g09d2