mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-20 21:38:26 +00:00
15 lines
388 B
Python
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)
|