Options
All
  • Public
  • Public/Protected
  • All
Menu

SHA-2-224 cryptographic hash algorithm.

SHA-224 is the same algorithm as SHA-256, but with different initialization vectors and digest length.

Hierarchy

  • SHA256
    • SHA224

Index

Constructors

  • Returns SHA224

Properties

_state: Int32Array
blockSize: number

Block size

digestLength: number = DIGEST_LENGTH

Methods

  • _initState(): void
  • clean(): void
  • Cleans internal buffers and resets hash state.

    Returns void

  • cleanSavedState(savedState: SavedState): void
  • Cleans state returned by saveState().

    Parameters

    • savedState: SavedState

    Returns void

  • digest(): Uint8Array
  • Returns the final hash digest.

    Returns Uint8Array

  • finish(out: Uint8Array): SHA224
  • Finalizes hash state and puts hash into out. If hash was already finalized, puts the same value.

    Parameters

    • out: Uint8Array

    Returns SHA224

  • Resets hash state making it possible to re-use this instance to hash other data.

    Returns SHA224

  • restoreState(savedState: SavedState): SHA224
  • Function useful for HMAC/PBKDF2 optimization. Restores state saved by saveState() and sets bytesHashed to the given value.

    Parameters

    • savedState: SavedState

    Returns SHA224

  • saveState(): SavedState
  • Function useful for HMAC/PBKDF2 optimization. Returns hash state to be used with restoreState(). Only chain value is saved, not buffers or other state variables.

    Returns SavedState

  • update(data: Uint8Array, dataLength?: number): SHA224
  • Updates hash state with the given data.

    Throws error when trying to update already finalized hash: instance must be reset to update it again.

    Parameters

    • data: Uint8Array
    • Optional dataLength: number

    Returns SHA224

Generated using TypeDoc