|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xbill.DNS.utils.HMAC
public class HMAC
A pure java implementation of the HMAC-MD5 secure hash algorithm
| Constructor Summary | |
|---|---|
HMAC(MessageDigest digest,
byte[] key)
Creates a new HMAC instance |
|
HMAC(String digestName,
byte[] key)
Creates a new HMAC instance |
|
| Method Summary | |
|---|---|
void |
clear()
Resets the HMAC object for further use |
byte[] |
sign()
Signs the data (computes the secure hash) |
void |
update(byte[] b)
Adds data to the current hash |
void |
update(byte[] b,
int offset,
int length)
Adds data to the current 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 |
| Constructor Detail |
|---|
public HMAC(MessageDigest digest,
byte[] key)
digest - The message digest object.key - The secret key
public HMAC(String digestName,
byte[] key)
digestName - The name of the message digest function.key - The secret key.| Method Detail |
|---|
public void update(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 update(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 | ||||||||