Options
All
  • Public
  • Public/Protected
  • All
Menu

HMAC implements hash-based message authentication algorithm.

Hierarchy

  • HMAC

Implements

  • SerializableHash

Index

Constructors

  • new HMAC(hash: new () => Hash | SerializableHash, key: Uint8Array): HMAC
  • Constructs a new HMAC with the given Hash and secret key.

    Parameters

    • hash: new () => Hash | SerializableHash
        • new (): Hash | SerializableHash
        • Returns Hash | SerializableHash

    • key: Uint8Array

    Returns HMAC

Properties

blockSize: number
digestLength: number

Methods

  • clean(): void
  • Cleans HMAC state.

    Returns void

  • cleanSavedState(savedState: any): void
  • Parameters

    • savedState: any

    Returns void

  • digest(): Uint8Array
  • Returns the computed message authentication code.

    Returns Uint8Array

  • finish(out: Uint8Array): HMAC
  • Finalizes HMAC and puts the result in out.

    Parameters

    • out: Uint8Array

    Returns HMAC

  • Returns HMAC state to the state initialized with key to make it possible to run HMAC over the other data with the same key without creating a new instance.

    Returns HMAC

  • restoreState(savedState: any): HMAC
  • Parameters

    • savedState: any

    Returns HMAC

  • saveState(): any
  • Saves HMAC state. This function is needed for PBKDF2 optimization.

    Returns any

  • update(data: Uint8Array): HMAC
  • Updates state with provided data.

    Parameters

    • data: Uint8Array

    Returns HMAC

Generated using TypeDoc