diff options
author | Jeff Forcier <jeff@bitprophet.org> | 2014-04-14 10:31:10 -0400 |
---|---|---|
committer | Jeff Forcier <jeff@bitprophet.org> | 2014-04-14 10:31:10 -0400 |
commit | c8cc53940c039c285e38f4cc7f566849190014e0 (patch) | |
tree | 0a46b3227ffed8dc0b9309cd6e9510ab8ccaeea2 /tests/test_pkey.py | |
parent | 57e647341f416c879ae3841c9a7be50c52a21327 (diff) | |
parent | 4d3e0b711a98c440810004cb599a00d0f72978d7 (diff) |
Merge remote-tracking branch 'alex/hashlib-hashes' into 295-int
Diffstat (limited to 'tests/test_pkey.py')
-rw-r--r-- | tests/test_pkey.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_pkey.py b/tests/test_pkey.py index 6ff68fc2..c457f0ee 100644 --- a/tests/test_pkey.py +++ b/tests/test_pkey.py @@ -20,11 +20,14 @@ Some unit tests for public/private key objects. """ -from binascii import hexlify import unittest +from binascii import hexlify +from hashlib import md5 + from paramiko import RSAKey, DSSKey, ECDSAKey, Message, util from paramiko.py3compat import StringIO, byte_chr, b, bytes from paramiko.common import rng + from tests.util import test_path # from openssh's ssh-keygen @@ -90,8 +93,7 @@ class KeyTest (unittest.TestCase): pass def test_1_generate_key_bytes(self): - from Crypto.Hash import MD5 - key = util.generate_key_bytes(MD5, x1234, 'happy birthday', 30) + key = util.generate_key_bytes(md5, x1234, 'happy birthday', 30) exp = b'\x61\xE1\xF2\x72\xF4\xC1\xC4\x56\x15\x86\xBD\x32\x24\x98\xC0\xE9\x24\x67\x27\x80\xF4\x7B\xB3\x7D\xDA\x7D\x54\x01\x9E\x64' self.assertEqual(exp, key) |