| java.lang.Object org.xbill.DNS.utils.HMAC
HMAC | public class HMAC (Code) | | A pure java implementation of the HMAC-MD5 secure hash algorithm
author: Brian Wellington |
Method Summary | |
public void | clear() | public byte[] | sign() | public void | update(byte[] b, int offset, int length) | public void | update(byte[] b) | public boolean | verify(byte[] signature) |
HMAC | public HMAC(MessageDigest digest, byte[] key)(Code) | | Creates a new HMAC instance
Parameters: digest - The message digest object. Parameters: key - The secret key |
HMAC | public HMAC(String digestName, byte[] key)(Code) | | Creates a new HMAC instance
Parameters: digestName - The name of the message digest function. Parameters: key - The secret key. |
clear | public void clear()(Code) | | Resets the HMAC object for further use
|
sign | public byte[] sign()(Code) | | Signs the data (computes the secure hash)
An array with the signature |
update | public void update(byte[] b, int offset, int length)(Code) | | Adds data to the current hash
Parameters: b - The data Parameters: offset - The index at which to start adding to the hash Parameters: length - The number of bytes to hash |
update | public void update(byte[] b)(Code) | | Adds data to the current hash
Parameters: b - The data |
verify | public boolean verify(byte[] signature)(Code) | | Verifies the data (computes the secure hash and compares it to the input)
Parameters: signature - The signature to compare against true if the signature matched, false otherwise |
|
|