aboutsummaryrefslogtreecommitdiffstats
path: root/src/python
diff options
context:
space:
mode:
authorKai Michaelis <[email protected]>2016-06-01 13:04:29 +0200
committerKai Michaelis <[email protected]>2016-06-01 13:04:29 +0200
commitf2c8233fdd7e4a9b56dfd77bfb8b137e98fe9022 (patch)
treec06083ac9a7fbf3596fbe5b73767146a6e619e15 /src/python
parentcf74d1c376df1d9e6400e264a1d059720eeaa059 (diff)
fix python bindings
Diffstat (limited to 'src/python')
-rwxr-xr-xsrc/python/botan.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/python/botan.py b/src/python/botan.py
index 6e5f457b3..fa476903c 100755
--- a/src/python/botan.py
+++ b/src/python/botan.py
@@ -342,11 +342,11 @@ def pbkdf_timed(algo, password, out_len, ms_to_run = 300, salt = rng().get(12)):
"""
KDF
"""
-def kdf(algo, secret, out_len, salt):
- botan.botan_kdf.argtypes = [c_char_p, POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(c_char), c_size_t]
+def kdf(algo, secret, out_len, salt, label):
+ botan.botan_kdf.argtypes = [c_char_p, POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(c_char), c_size_t, POINTER(c_char), c_size_t]
out_buf = create_string_buffer(out_len)
out_sz = c_size_t(out_len)
- botan.botan_kdf(_ctype_str(algo), out_buf, out_sz, secret, len(secret), salt, len(salt))
+ botan.botan_kdf(_ctype_str(algo), out_buf, out_sz, secret, len(secret), salt, len(salt), label, len(label))
return out_buf.raw[0:out_sz.value]
"""
@@ -699,7 +699,7 @@ def test():
def test_kdf():
print("KDF2(SHA-1) %s" %
hex_encode(kdf('KDF2(SHA-1)', hex_decode('701F3480DFE95F57941F804B1B2413EF'), 7,
- hex_decode('55A4E9DD5F4CA2EF82'))))
+ hex_decode('55A4E9DD5F4CA2EF82'), '')))
def test_pbkdf():
print("PBKDF2(SHA-1) %s" %