Address more review comments.
parent
47b0ac5af9
commit
397725336e
1
setup.py
1
setup.py
|
|
@ -60,7 +60,6 @@ setup(
|
|||
packages=find_packages(),
|
||||
|
||||
setup_requires=["cffi>=1.17"],
|
||||
install_requires=["cffi>=1.17"],
|
||||
cffi_modules=["./scripts/build_ffi.py:ffibuilder"],
|
||||
|
||||
package_data={"wolfcrypt": ["*.dll", "**/*.pyi", "py.typed"]},
|
||||
|
|
|
|||
|
|
@ -2092,6 +2092,14 @@ if _lib.ML_KEM_ENABLED:
|
|||
:return: tuple of a shared secret (first element) and the cipher text (second element)
|
||||
:rtype: tuple[bytes, bytes]
|
||||
"""
|
||||
|
||||
try:
|
||||
memoryview(rand)
|
||||
except TypeError as exception:
|
||||
raise TypeError("rand must support the buffer protocol, such as `bytes` or `bytearray`") from exception
|
||||
|
||||
rand = bytes(rand)
|
||||
|
||||
ct_size = self.ct_size
|
||||
ss_size = self.ss_size
|
||||
ct = _ffi.new(f"unsigned char[{ct_size}]")
|
||||
|
|
|
|||
Loading…
Reference in New Issue