Abstract
HMAC algorithm.
Finalizes the HMAC computation. Note that the finalize operation is effectively a destructive, read-once operation.
Optional
(Optional) A final message update.
The HMAC.
var hmac = hmacHasher.finalize(); var hmac = hmacHasher.finalize('message'); var hmac = hmacHasher.finalize(wordArray); Copy
var hmac = hmacHasher.finalize(); var hmac = hmacHasher.finalize('message'); var hmac = hmacHasher.finalize(wordArray);
Resets this HMAC to its initial state.
hmacHasher.reset(); Copy
hmacHasher.reset();
Updates this HMAC with a message.
The message to append.
This HMAC instance.
hmacHasher.update('message'); hmacHasher.update(wordArray); Copy
hmacHasher.update('message'); hmacHasher.update(wordArray);
Static
Initializes a newly created HMAC.
The hash algorithm to use.
The secret key.
var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); Copy
var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
HMAC algorithm.