Example #1
0
    def test_validatePassword_error(self):
        testHash = scrypt(b'testPswd', salt=b'testSalt', n=2**14, r=8, p=1)

        assert APIUtils.validatePassword('testError', testHash, b'testSalt')\
            is False
Example #2
0
    def test_validatePassword_success(self):
        testHash = scrypt(b'testPswd', salt=b'testSalt', n=2**14, r=8, p=1)

        assert APIUtils.validatePassword('testPswd', testHash, b'testSalt')\
            is True