This commit is contained in:
Alex Gaynor 2015-03-13 21:32:19 -04:00
parent ea678c1dd1
commit ba5e135a02

View File

@ -265,6 +265,7 @@ def test_hashpw_str_salt():
six.text_type("$2a$04$cVWp4XaNU8a4v1uMRum2SO"),
)
def test_nul_byte():
with pytest.raises(ValueError):
bcrypt.hashpw(b"abc\0def", bcrypt.gensalt(0))