@nextcloud/dialogs
    Preparing search index...

    Interface Crypto

    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

    interface Crypto {
        subtle: SubtleCrypto;
        getRandomValues<T extends ArrayBufferView<ArrayBuffer>>(array: T): T;
        randomUUID(): `${string}-${string}-${string}-${string}-${string}`;
    }
    Index

    Properties

    subtle: SubtleCrypto

    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.

    MDN Reference

    Methods

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

      MDN Reference

      Type Parameters

      Parameters

      • array: T

      Returns T

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

      MDN Reference

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