On this page

C

Crypto

History

globalThis.crypto is an instance of the Crypto class. Crypto is a singleton that provides access to the remainder of the crypto API.

P

crypto.subtle

History

Provides access to the SubtleCrypto API.

M

crypto.getRandomValues

History
crypto.getRandomValues(typedArray): Buffer | TypedArray
Attributes
typedArray:Buffer | TypedArray
Returns:Buffer | TypedArray

Generates cryptographically strong random values. The given typedArray is filled with random values, and a reference to typedArray is returned.

The given typedArray must be an integer-based instance of TypedArray, i.e. Float32Array and Float64Array are not accepted.

An error will be thrown if the given typedArray is larger than 65,536 bytes.

M

crypto.randomUUID

History
crypto.randomUUID(): string
Returns:string

Generates a random RFC 4122 version 4 UUID. The UUID is generated using a cryptographic pseudorandom number generator.