aboutsummaryrefslogtreecommitdiff
path: root/frozen_deps/Cryptodome/Hash/cSHAKE128.py
diff options
context:
space:
mode:
Diffstat (limited to 'frozen_deps/Cryptodome/Hash/cSHAKE128.py')
-rw-r--r--frozen_deps/Cryptodome/Hash/cSHAKE128.py6
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.