コード例 #1
0
ファイル: _test_utils.py プロジェクト: mardix/webportfolio
def test_encrypted_string():
    pw = "hello world"
    e = utils.encrypt_string(pw)
    v = utils.verify_encrypted_string(pw, e)
    assert v is True
コード例 #2
0
ファイル: __init__.py プロジェクト: mardix/webportfolio
 def password_matched(self, password):
     """
     Check if the password matched the hash
     :returns bool:
     """
     return utils.verify_encrypted_string(password, self.password_hash)