@haxall/haxall
    Preparing search index...

    Importing the webcrypto object (import { webcrypto } from 'node:crypto') gives an instance of the Crypto class. Crypto is a singleton that provides access to the remainder of the crypto API.

    v15.0.0

    interface Crypto {
        CryptoKey: CryptoKeyConstructor;
        subtle: SubtleCrypto;
        getRandomValues<
            T extends
                | Uint8Array<ArrayBufferLike>
                | Uint8ClampedArray<ArrayBufferLike>
                | Uint16Array<ArrayBufferLike>
                | Uint32Array<ArrayBufferLike>
                | Int8Array<ArrayBufferLike>
                | Int16Array<ArrayBufferLike>
                | Int32Array<ArrayBufferLike>
                | BigUint64Array<ArrayBufferLike>
                | BigInt64Array<ArrayBufferLike>,
        >(
            typedArray: T,
        ): T;
        randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
    }
    Index

    Properties

    subtle: SubtleCrypto

    Provides access to the SubtleCrypto API.

    v15.0.0

    Methods

    • 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 NodeJS.TypedArray, i.e. Float32Array and Float64Array are not accepted.

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

      Type Parameters

      • T extends
            | Uint8Array<ArrayBufferLike>
            | Uint8ClampedArray<ArrayBufferLike>
            | Uint16Array<ArrayBufferLike>
            | Uint32Array<ArrayBufferLike>
            | Int8Array<ArrayBufferLike>
            | Int16Array<ArrayBufferLike>
            | Int32Array<ArrayBufferLike>
            | BigUint64Array<ArrayBufferLike>
            | BigInt64Array<ArrayBufferLike>

      Parameters

      • typedArray: T

      Returns T

      v15.0.0

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

      Returns `${string}-${string}-${string}-${string}-${string}`

      v16.7.0