aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_utils.py
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2014-01-29 15:09:49 -0800
committerDavid Reid <dreid@dreid.org>2014-01-29 15:09:49 -0800
commitb2ff87737ca27a171ce0034e100841782d19dd7b (patch)
treefde20b858f07d70a1dcc3f8f2b78bc02480630e5 /tests/test_utils.py
parentbabc4d50f42edc1e16c414e4008114d882b4c999 (diff)
parent0b181182aef574c436a92a175937af32e54a2378 (diff)
downloadcryptography-b2ff87737ca27a171ce0034e100841782d19dd7b.tar.gz
cryptography-b2ff87737ca27a171ce0034e100841782d19dd7b.tar.bz2
cryptography-b2ff87737ca27a171ce0034e100841782d19dd7b.zip
Merge pull request #520 from reaperhulk/pbkdf2-openssl
PBKDF2 Support (OpenSSL backend)
Diffstat (limited to 'tests/test_utils.py')
-rw-r--r--tests/test_utils.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index f852f3ab..8ecb33f9 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -180,6 +180,25 @@ def test_load_nist_vectors():
]
+def test_load_nist_vectors_with_null_chars():
+ vector_data = textwrap.dedent("""
+ COUNT = 0
+ KEY = thing\\0withnulls
+
+ COUNT = 1
+ KEY = 00000000000000000000000000000000
+ """).splitlines()
+
+ assert load_nist_vectors(vector_data) == [
+ {
+ "key": b"thing\x00withnulls",
+ },
+ {
+ "key": b"00000000000000000000000000000000",
+ },
+ ]
+
+
def test_load_cryptrec_vectors():
vector_data = textwrap.dedent("""
# Vectors taken from http://info.isl.ntt.co.jp/crypt/eng/camellia/