aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMouse <[email protected]>2015-08-14 17:36:33 -0400
committerMouse <[email protected]>2015-08-14 17:36:33 -0400
commit4d14b143c458c4005c2fc48c95c8fd517290ec7b (patch)
treee1e53682969e82a7814fddf9e94d392ea54ff7bd
parent451e0be58e0611a56bfed2c2ac3315dfbc6f244c (diff)
Changed tabs to 4 spaces
-rwxr-xr-xsrc/python/botan.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/python/botan.py b/src/python/botan.py
index 53d95ca61..a28f3ddb0 100755
--- a/src/python/botan.py
+++ b/src/python/botan.py
@@ -13,15 +13,15 @@ Botan is released under the Simplified BSD License (see license.txt)
import sys
from ctypes import *
from binascii import hexlify, unhexlify
-import base64
+
"""
Module initialization
"""
if sys.platform == 'darwin':
- botan = CDLL('libbotan-1.11.dylib')
+ botan = CDLL('libbotan-1.11.dylib')
else:
- botan = CDLL('libbotan-1.11.so')
+ botan = CDLL('libbotan-1.11.so')
expected_api_rev = 20150210
botan_api_rev = botan.botan_ffi_api_version()
@@ -546,7 +546,7 @@ def test():
print("KDF2(SHA-1) %s" %
- base64.b16encode(kdf('KDF2(SHA-1)'.encode('ascii'), unhexlify('701F3480DFE95F57941F804B1B2413EF'), 7,
+ hexlify(kdf('KDF2(SHA-1)'.encode('ascii'), unhexlify('701F3480DFE95F57941F804B1B2413EF'), 7,
unhexlify('55A4E9DD5F4CA2EF82'))
).decode('ascii')
)
@@ -569,7 +569,7 @@ def test():
(hexlify(salt), len(salt), iterations) )
else:
print("PBKDF2(SHA-256) x=timed, y=iterated; salt = %s (len=%d) #iterations = %d\n" %
- (base64.b16encode(salt).decode('ascii'), len(salt), iterations) )
+ (hexlify(salt).decode('ascii'), len(salt), iterations) )
print('x %s' % hexlify(psk).decode('utf-8'))
print('y %s\n' %