getRandomValues

external fun <T : ArrayBufferView<ArrayBuffer>> getRandomValues(array: T): T(source)

The Crypto.getRandomValues() method lets you get cryptographically strong random values. The array given as the parameter is filled with random numbers (random in its cryptographic meaning).

MDN Reference