Crypto

open class Crypto(source)

The Crypto interface represents basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives.

MDN Reference

Properties

Link copied to clipboard

The Crypto.subtle read-only property returns a SubtleCrypto which can then be used to perform low-level cryptographic operations. Available only in secure contexts.

Functions

Link copied to clipboard

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).

Link copied to clipboard

The randomUUID() method of the Crypto interface is used to generate a v4 UUID using a cryptographically secure random number generator. Available only in secure contexts.