mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 06:12:10 +03:00
randomNumericId builds a non-secret synthetic device/web id. The v3.8.45 switch to crypto.getRandomValues closed js/insecure-randomness but 'cryptoByte % 10' is biased (256 is not a multiple of 10), tripping js/biased-cryptographic-random. Draw each digit by rejection sampling — discard bytes in the biased tail so the remaining range divides evenly — giving a uniform distribution (verified) while staying crypto-backed.