Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives.

interface Crypto {
    subtle: SubtleCrypto;
    getRandomValues<T>(array: T): T;
    randomUUID(): string;
}

Properties

subtle: SubtleCrypto

Available only in secure contexts.

Methods

  • Type Parameters

    Parameters

    • array: T

    Returns T

  • Available only in secure contexts.

    Returns string