mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-07-01 04:12:37 +00:00
19 lines
427 B
Python
19 lines
427 B
Python
from typing import *
|
|
def uniform(n: int) -> int:
|
|
"""
|
|
Compute uniform random number from interval 0 ... n - 1.
|
|
"""
|
|
import builtins
|
|
def bytes(len: int) -> builtins.bytes:
|
|
"""
|
|
Generate random bytes sequence of length len.
|
|
"""
|
|
def shuffle(data: list) -> None:
|
|
"""
|
|
Shuffles items of given list (in-place).
|
|
"""
|
|
def reseed(value: int) -> None:
|
|
"""
|
|
Re-seed the RNG with given value.
|
|
"""
|