summaryrefslogtreecommitdiffhomepage
path: root/tests/test_util.py
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-04-14 10:58:43 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2014-04-14 10:58:43 -0400
commitb0876fa01394186d08938430f9459012fdde3bf1 (patch)
tree2eb38cbd35029e18051e8853a73ff5c1b2deacae /tests/test_util.py
parentfded67e7120d79c619e541ccd3ba19898c194b5b (diff)
parentfa86d655dc8f08eb9171930c41b508e2bee08b08 (diff)
Merge branch 'master' into ecdsa-deterministic
Conflicts: paramiko/ecdsakey.py
Diffstat (limited to 'tests/test_util.py')
-rw-r--r--tests/test_util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_util.py b/tests/test_util.py
index 6bde4045..af6eceb5 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -23,7 +23,8 @@ Some unit tests for utility functions.
from binascii import hexlify
import errno
import os
-from Crypto.Hash import SHA
+from hashlib import sha1
+
import paramiko.util
from paramiko.util import lookup_ssh_host_config as host_config
from paramiko.py3compat import StringIO, byte_ord
@@ -136,7 +137,7 @@ class UtilTest(ParamikoTest):
)
def test_4_generate_key_bytes(self):
- x = paramiko.util.generate_key_bytes(SHA, b'ABCDEFGH', 'This is my secret passphrase.', 64)
+ x = paramiko.util.generate_key_bytes(sha1, b'ABCDEFGH', 'This is my secret passphrase.', 64)
hex = ''.join(['%02x' % byte_ord(c) for c in x])
self.assertEqual(hex, '9110e2f6793b69363e58173e9436b13a5a4b339005741d5c680e505f57d871347b4239f14fb5c46e857d5e100424873ba849ac699cea98d729e57b3e84378e8b')