Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7a9a4de5c0
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (13 sloc) 0.431 kb
from passwords import hash, verify
def test_pbkdf2_valid():
hashed = hash('test1')
assert verify('test1', hashed)
def test_pbkdf2_invalid():
hashed = hash('test1')
assert not verify('test2', hashed)
def test_bcrypt_valid():
hashed = hash('test1', "bcrypt", 12)
assert verify('test1', hashed)
def test_bcrypt_invalid():
hashed = hash('test1', "bcrypt", 12)
assert not verify('test2', hashed)
Jump to Line
Something went wrong with that request. Please try again.