|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.xml.ws.security.opt.crypto.dsig.internal.HmacSHA1
public class HmacSHA1
An implementation of the HMAC-SHA1 (RFC 2104)
| Constructor Summary | |
|---|---|
HmacSHA1()
|
|
| Method Summary | |
|---|---|
void |
init(java.security.Key key,
int length)
Initialize with the key |
byte[] |
sign()
Signs the data |
void |
update(byte data)
|
void |
update(byte[] data)
update the engine with data |
void |
update(byte[] data,
int offset,
int len)
|
boolean |
verify(byte[] signature)
Verifies the signature |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HmacSHA1()
| Method Detail |
|---|
public void init(java.security.Key key,
int length)
throws java.security.InvalidKeyException
key - a Hmac keylength - output length in byte. length should be > 0 for a
specified length or -1 for unspecified length (length of the signed output)
java.security.InvalidKeyException - if key is nullpublic void update(byte[] data)
data - information to be signed or verifiedpublic void update(byte data)
public void update(byte[] data,
int offset,
int len)
public byte[] sign()
throws java.security.SignatureException
java.security.SignatureException
public boolean verify(byte[] signature)
throws java.security.SignatureException
siganture - the signature to be verified
java.security.SignatureException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||