diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-14 10:56:05 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-04-14 10:56:05 -0400 |
commit | 191fd465f166588922ccbf08b65d4479d8520d6a (patch) | |
tree | 673a3ad36d919009d2621b6e1d3b102cf7988aa9 /tests/test_util.py | |
parent | 6c6969c1882e62d6249264d2df46ff452eb53e7e (diff) | |
parent | fa86d655dc8f08eb9171930c41b508e2bee08b08 (diff) |
Merge branch 'master' into use-urandom
Conflicts:
paramiko/dsskey.py
paramiko/ecdsakey.py
paramiko/hostkeys.py
paramiko/kex_gex.py
paramiko/kex_group1.py
paramiko/pkey.py
paramiko/primes.py
paramiko/rsakey.py
tests/test_pkey.py
Diffstat (limited to 'tests/test_util.py')
-rw-r--r-- | tests/test_util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_util.py b/tests/test_util.py index d3911f49..69c75518 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') |