gnu.crypto.mac
public class HMac extends BaseMac implements Cloneable
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
References:
Version: $Revision: 1.10 $
| Field Summary | |
|---|---|
| protected int | blockSize |
| protected byte[] | ipad |
| protected IMessageDigest | ipadHash |
| protected int | macSize |
| protected IMessageDigest | opadHash |
| static String | USE_WITH_PKCS5_V2 |
| Constructor Summary | |
|---|---|
| protected | HMac(IMessageDigest underlyingHash) Trivial constructor for use by concrete subclasses. |
| Method Summary | |
|---|---|
| byte[] | digest() |
| void | init(Map attributes) |
| void | reset() |
| boolean | selfTest() |
Trivial constructor for use by concrete subclasses.
Parameters: underlyingHash the underlying hash algorithm instance.