A SubtleCrypto
which can be
used to perform low-level cryptographic operations.
Fills the provided TypedArray
with cryptographically strong random values.
The TypedArray
to fill with random values.
The same TypedArray
filled with random values.
const array = new Uint32Array(10);
crypto.getRandomValues(array);
console.log("Your lucky numbers:");
for (const num of array) {
console.log(num);
}
https://developer.mozilla.org/docs/Web/API/Crypto/getRandomValues
Generates a cryptographically strong random unique identifier (UUID).
A string representation of a UUID.
const uuid = crypto.randomUUID();
console.log(uuid);
// "36b8f84d-df4e-4d49-b662-bcde71a8764f"
https://developer.mozilla.org/docs/Web/API/Crypto/randomUUID
Generated using TypeDoc
Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives.
See
https://developer.mozilla.org/docs/Web/API/Crypto