1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-15 12:08:59 +00:00
trezor-firmware/storage/tests/python/tests/test_pin_log.py
2019-08-12 12:57:25 +02:00

15 lines
388 B
Python

from ..src import pin_log, prng
def test_generate_guard_key():
prng.random_reseed(0)
p = pin_log.PinLog(None)
assert p._generate_guard_key() == 2267428717
assert p._generate_guard_key() == 1653399972
assert p._check_guard_key(2267428717)
assert p._check_guard_key(1653399972)
assert p._check_guard_key(3706993061)
assert p._check_guard_key(3593237286)