We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f6c9d6 commit 4aa44f8Copy full SHA for 4aa44f8
pysodium/__init__.py
@@ -1500,7 +1500,7 @@ def crypto_hash_sha512_final(state):
1500
# const unsigned char key[crypto_kdf_KEYBYTES])
1501
def crypto_kdf_derive_from_key(subkey_len, subkey_id, ctx, key):
1502
if len(ctx) != crypto_kdf_CONTEXTBYTES: raise ValueError("invalid context")
1503
- if len(key) != crypto_kdf_KEYBYTES: raise ValueError("invalid context")
+ if len(key) != crypto_kdf_KEYBYTES: raise ValueError("invalid key")
1504
if not (crypto_kdf_BYTES_MIN <= subkey_len <= crypto_kdf_BYTES_MAX): raise ValueError("invalid subkey len")
1505
subkey = ctypes.create_string_buffer(subkey_len)
1506
si = ctypes.c_uint64(subkey_id)
0 commit comments