HMAC algorithm.

Constructors

Methods

Constructors

Methods

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

    Parameters

    Returns cryptojs.lib.WordArray

    The HMAC.

    var hmac = hmacHasher.finalize();
    var hmac = hmacHasher.finalize('message');
    var hmac = hmacHasher.finalize(wordArray);
  • Resets this HMAC to its initial state.

    Returns void

    hmacHasher.reset();
    
  • Updates this HMAC with a message.

    Parameters

    Returns this

    This HMAC instance.

    hmacHasher.update('message');
    hmacHasher.update(wordArray);
  • Initializes a newly created HMAC.

    Parameters

    Returns HMAC

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