Options
All
  • Public
  • Public/Protected
  • All
Menu

Base interface for various Sha hash implementations

Hierarchy

  • ISha

Implemented by

Index

Methods

append

  • append(input: string | ArrayBuffer | ArrayBufferView): void
  • Append data to this instance, updating the hash. You can pass an ArrayBuffer, any of the TypedArrays (for example Uint8Array), a DataView or a string.

    When passing a string, the string is first UTF-8 encoded to an Uint8Array.

    throws

    Error if any of the digest*() methods have been called before calling this method.

    Parameters

    • input: string | ArrayBuffer | ArrayBufferView

    Returns void

digestToHex

  • digestToHex(): string
  • Return the hash as a lowercase hex string.

    Returns string

digestToUint32Array

  • digestToUint32Array(): Uint32Array
  • Return the hash value as an array of 32-bit unsigned int words.

    Returns Uint32Array

digestToUint8Array

  • digestToUint8Array(): Uint8Array
  • Returns the hash value as an array of bytes where each 32-bit word in the hash is output in big-endian order, i.e. the most significant byte first.

    Returns Uint8Array

reset

  • reset(): void
  • Resets the hash and "forgets" any data that has been appended. The instance behaves as if it were a new instance.

    Returns void

Generated using TypeDoc