Options
All
  • Public
  • Public/Protected
  • All
Menu

HMAC algorithm.

Hierarchy

  • HMAC

Index

Constructors

constructor

Methods

finalize

  • Finalizes the HMAC computation. Note that the finalize operation is effectively a destructive, read-once operation.

    example
    var hmac = hmacHasher.finalize();
    var hmac = hmacHasher.finalize('message');
    var hmac = hmacHasher.finalize(wordArray);

    Parameters

    Returns cryptojs.lib.WordArray

    The HMAC.

reset

  • reset(): void
  • Resets this HMAC to its initial state.

    example
    hmacHasher.reset();
    

    Returns void

update

  • Updates this HMAC with a message.

    example
    hmacHasher.update('message');
    hmacHasher.update(wordArray);

    Parameters

    Returns HMAC

    This HMAC instance.

Static create

  • Initializes a newly created HMAC.

    example
    var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
    

    Parameters

    • hasher: HasherStatic

      The hash algorithm to use.

    • key: string | cryptojs.lib.WordArray

      The secret key.

    Returns HMAC

Generated using TypeDoc