Represents a 256-bit hash.

Hierarchy (view full)

Constructors

Properties

Methods

Constructors

  • Creates a hash from bytes or a hex string.

    Parameters

    • hash256: string | Uint8Array

      Input string or byte array.

    Returns Hash256

Properties

bytes: Uint8Array

Underlying bytes.

NAME: string

Byte array name (required because constructor.name is dropped during minification).

SIZE: number

Byte size of raw hash.

Methods

  • Returns representation of this object that can be stored in JSON.

    Returns string

    JSON-safe representation of this object.

  • Returns string representation of this object.

    Returns string

    String representation of this object

  • Creates a zeroed hash.

    Returns Hash256

    Zeroed hash.