|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbill.DNS.utils.hmacSigner
A pure java implementation of the HMAC-MD5 secure hash algorithm
| Field Summary | |
static boolean |
verbose
If true, all digested bytes will be printed |
| Constructor Summary | |
hmacSigner(byte[] key)
Creates a new HMAC instance |
|
| Method Summary | |
void |
addData(byte[] b)
Adds data to the current hash |
void |
addData(byte[] b,
int offset,
int length)
Adds data to the current hash |
void |
clear()
Resets the HMAC object for further use |
byte[] |
sign()
Signs the data (computes the secure hash) |
boolean |
verify(byte[] signature)
Verifies the data (computes the secure hash and compares it to the input) |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean verbose
| Constructor Detail |
public hmacSigner(byte[] key)
key - The secret key| Method Detail |
public void addData(byte[] b,
int offset,
int length)
b - The dataoffset - The index at which to start adding to the hashlength - The number of bytes to hashpublic void addData(byte[] b)
b - The datapublic byte[] sign()
public boolean verify(byte[] signature)
signature - The signature to compare against
public void clear()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||