Fix kdf_calc.py.

This commit is contained in:
NIIBE Yutaka
2018-04-02 10:44:17 +09:00
parent d71b116be8
commit 8ad176921f

View File

@@ -44,4 +44,4 @@ def kdf_calc(pw_string, salt_byte, iterations):
GCRY_MD_SHA256, salt, 8, iterations, 32, kb)
if r != 0:
raise ValueError("libgcrypt error", r)
return ffi.string(kb)
return ffi.unpack(kb, 32)