SHA2-384 cryptographic hash algorithm.

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

Hierarchy (view full)

Constructors

Properties

_stateHi: Int32Array
_stateLo: Int32Array
blockSize: number

Block size

digestLength: 48 = DIGEST_LENGTH

Length of hash output

Methods

  • Cleans internal buffers and resets hash state.

    Returns void

  • Cleans state returned by saveState().

    Parameters

    Returns void

  • Returns the final hash digest.

    Returns Uint8Array

  • Finalizes hash state and puts hash into out. If hash was already finalized, puts the same value.

    Parameters

    • out: Uint8Array

    Returns this

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

    Returns this

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

    Parameters

    Returns this

  • 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

  • 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
    • OptionaldataLength: number

    Returns this