https://github.com/CTFd/CTFd/milestone/6
This commit is contained in:
Kevin Chung
2019-04-17 01:36:30 -04:00
committed by GitHub
parent 33367422a5
commit b6d54b9ee9
278 changed files with 3659 additions and 13735 deletions

View File

@@ -1,12 +1,12 @@
from CTFd.utils.security.passwords import sha256, hash_password, check_password
from CTFd.utils.crypto import sha256, hash_password, verify_password
def test_hash_password():
assert hash_password('asdf').startswith('$bcrypt-sha256')
def test_check_password():
assert check_password('asdf', '$bcrypt-sha256$2b,12$I0CNXRkGD2Bi/lbC4vZ7Y.$1WoilsadKpOjXa/be9x3dyu7p.mslZ6') == True
def test_verify_password():
assert verify_password('asdf', '$bcrypt-sha256$2b,12$I0CNXRkGD2Bi/lbC4vZ7Y.$1WoilsadKpOjXa/be9x3dyu7p.mslZ6')
def test_sha256():