public class HMac
extends BaseMac
The implementation of the HMAC (Keyed-Hash Message Authentication Code).
HMAC can be used in combination with any iterated cryptographic hash function. HMAC also uses a secret key for calculation and verification of the message authentication values. The main goals behind this construction are
* To use, without modifications, available hash functions. In particular, hash functions that perform well in software, and for which code is freely and widely available.
* To preserve the original performance of the hash function without incurring a significant degradation.
* To use and handle keys in a simple way.
* To have a well understood cryptographic analysis of the strength of the authentication mechanism based on reasonable assumptions on the underlying hash function.
* To allow for easy replaceability of the underlying hash function in case that faster or more secure hash functions are found or required.