Cashu-TS - v4.0.0-rc3
    Preparing search index...

    Function computeMessageDigest

    • Computes the SHA-256 hash of a UTF-8 message string.

      Parameters

      • message: string

        To hash (UTF-8 encoded before hashing).

      Returns Uint8Array

      SHA-256 hash as raw bytes or hex string, depending on asHex.

    • Computes the SHA-256 hash of a UTF-8 message string.

      Parameters

      • message: string

        To hash (UTF-8 encoded before hashing).

      • asHex: false

        Optional: True returns a hex-encoded hash string; otherwise returns raw bytes.

      Returns Uint8Array

      SHA-256 hash as raw bytes or hex string, depending on asHex.

    • Computes the SHA-256 hash of a UTF-8 message string.

      Parameters

      • message: string

        To hash (UTF-8 encoded before hashing).

      • asHex: true

        Optional: True returns a hex-encoded hash string; otherwise returns raw bytes.

      Returns string

      SHA-256 hash as raw bytes or hex string, depending on asHex.