Function sha256Hex

  • The SHA-256 of a text's UTF-8 bytes, or of bytes, in lower-case hexadecimal: by the platform's crypto.subtle where it has one, and by the library's own SHA-256 where it has none, as in a page outside a secure context.

    Parameters

    • input: string | Uint8Array<ArrayBufferLike>

      A text, hashed as UTF-8, or bytes.

    Returns Promise<string>