public interface MAC
This interface is a slimmed-down version of
The library gets the implementation class from a configuration option (with the name of the algorithm as key) and then instantiates an object using the no-argument constructor. The algorithms to be used are negotiated during key exchange.
The library includes two implementations for each of the algorithms
hmac-md5-96, one based on JCE's
(available in Java SE from 1.4 on) and another one done manually
The latter ones are by default used on
Mac OS X, the former ones
on other systems.
|Modifier and Type||Method and Description|
Finalizes the production of the digest, producing the digest value.
The size of the produced MAC, i.e. the digest length, in bytes.
The name of the algorithm, as defined in RFC 4253.
Initializes the MAC, providing the key.
Updates the MAC with some data.
Updates the MAC with 4 bytes of data.
void init(byte key) throws Exception
void update(byte foo, int start, int len)
foo- an array containing the data to authenticate.
start- the position in
foowhere the data starts.
len- the length of the data.
void update(int foo)
foo- a 32 bit value, which will be interpreted as 4 bytes in big-endian order.
void doFinal(byte buf, int offset)
buf- an array to put the authentication code into.
offset- the position in
bufwhere the output should begin.
This is an inofficial Javadoc created by Paŭlo Ebermann. Have a look at the official homepage.