rng¶
Generate (pseudo-)random numbers.
Note
This is just a convenience layer on top of lib8tion.h
right now,
but may use another source in the future.
-
void rng_set_seed(uint16_t seed)¶
[source] Set the seed for the RNG. eg: invoking it from
keyboard_post_init_user
before consuming RNG.Tip
- You can for example call this:
The reading on a floating ADC pin
The value on some uninitialized memory address (only good entropy on cold start)
Warning
Setting a constant value means the PRNG sequence will be the same on every restart.