gnu.crypto.mac
public abstract class BaseMac extends Object implements IMac
A base abstract class to facilitate MAC (Message Authentication Code) implementations.
Version: $Revision: 1.6 $
| Field Summary | |
|---|---|
| protected String | name The canonical name prefix of the MAC. |
| protected int | truncatedSize The length of the truncated output in bytes. |
| protected IMessageDigest | underlyingHash Reference to the underlying hash algorithm instance. |
| Constructor Summary | |
|---|---|
| protected | BaseMac(String name) Trivial constructor for use by concrete subclasses. |
| protected | BaseMac(String name, IMessageDigest underlyingHash) Trivial constructor for use by concrete subclasses. |
| Method Summary | |
|---|---|
| Object | clone() |
| abstract byte[] | digest() |
| abstract void | init(Map attributes) |
| int | macSize() |
| String | name() |
| void | reset() |
| abstract boolean | selfTest() |
| void | update(byte b) |
| void | update(byte[] b, int offset, int len) |
Trivial constructor for use by concrete subclasses.
Parameters: name the canonical name of this instance.
Trivial constructor for use by concrete subclasses.
Parameters: name the canonical name of this instance. underlyingHash the underlying message digest algorithm instance.