The crypto.subtle
interface is not yet implemented.
An error will be thrown if this property is accessed.
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);
}
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"
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.