Library API
    Preparing search index...

    Function hash

    • Computes a cryptographic hash digest for the provided source payload.

      Parameters

      • source: string | Object

        The data to hash

      • Optionallen: number

        Optional length to truncate the resulting hex string

      • alg: string = 'SHA-256'

        The hash algorithm to use (default: 'SHA-256')

      Returns Promise<string>

      A promise resolving to the hash hex string