gnu.crypto.mac
Class BaseMac
- Cloneable, IMac
public abstract class BaseMac
extends java.lang.Object
A base abstract class to facilitate MAC (Message Authentication
Code) implementations.
Version:
BaseMac(String name) - Trivial constructor for use by concrete subclasses.
|
BaseMac(String name, IMessageDigest underlyingHash) - Trivial constructor for use by concrete subclasses.
|
name
protected String name
The canonical name prefix of the MAC.
truncatedSize
protected int truncatedSize
The length of the truncated output in bytes.
underlyingHash
protected IMessageDigest underlyingHash
Reference to the underlying hash algorithm instance.
BaseMac
protected BaseMac(String name)
Trivial constructor for use by concrete subclasses.
name
- the canonical name of this instance.
BaseMac
protected BaseMac(String name,
IMessageDigest underlyingHash)
Trivial constructor for use by concrete subclasses.
name
- the canonical name of this instance.underlyingHash
- the underlying message digest algorithm instance.
clone
public Object clone()
- clone in interface IMac
digest
public byte[] digest()
- digest in interface IMac
init
public void init(Map attributes)
throws InvalidKeyException,
IllegalStateException
- init in interface IMac
name
public String name()
- name in interface IMac
reset
public void reset()
- reset in interface IMac
update
public void update(byte b)
- update in interface IMac
update
public void update(byte[] b,
int offset,
int len)
- update in interface IMac
Copyright © 2001, 2002, 2003
Free Software Foundation,
Inc. All Rights Reserved.