Fix kdf_calc.py.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 2 Apr 2018 01:44:17 +0000 (10:44 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 3 Apr 2018 08:17:28 +0000 (17:17 +0900)
tool/kdf_calc.py

index 76b7b23..ff4a643 100644 (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)