Lens Scripting API
    Preparing search index...

    The Crypto.subtle read-only property returns an object which can then be used to perform low-level cryptographic operations.

    Index

    Methods

    Methods

    • Generates a cryptographic hash of the given data using the specified algorithm. This method replicates crypto.subtle.digest() from the Web Crypto API, suitable for SHA and other algorithms.

      algorithm The hash algorithm to use (e.g., "SHA1", "SHA256", "SHA384", "SHA512").

      data The data to hash.

      Returns: A Promise that resolves to the hashed output as an Uint8Array.

      Parameters

      • algorithm: string
      • data: Uint8Array

      Returns Promise<Uint8Array>