📦 Archived documentation: r1 (committed 2026-07-24) View current documentation →

Math.random()

Math.random() → number

Returns a 32-bit random number from the hardware random number generator.

Unlike standard JavaScript, Math.random() on the Q5C is backed by the hardware random number generator, making it suitable for nonces and keys.

Returns

number 32-bit hardware random number.

Example

let nonce = Math.random();