|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jxta.security.impl.mac.MACAlgorithm
Fields inherited from interface jxta.security.mac.MAC |
ALG_NULL,
ALG_RC4_MD5,
ALG_RC4_SHA1,
MODE_ENCRYPT,
MODE_VERIFY,
name |
Constructor Summary | |
MACAlgorithm(jxta.security.cipher.Cipher cipherAlg,
byte theType,
jxta.security.hash.Hash theDigest)
constructor |
Method Summary | |
void |
clearDebug()
turn off debugging |
int |
encrypt(byte[] inbuf,
int offset,
int inLength,
byte[] macBuf,
int macOffset)
Signs the hash generated from the last(only) buffer of data. |
byte |
getAlgorithm()
// Algorithm type |
java.lang.String |
getAlgorithmName()
// Algorithm name |
int |
getLength()
get the length of the signature |
void |
init(byte theMode,
jxta.security.cipher.Key theKey,
byte[] privateKey)
initialize the Signature mode - sign or verify |
void |
setDebug()
turn on debugging |
void |
update(byte[] inbuf,
int offset,
int length)
updates data to be encrypted. |
boolean |
verify(byte[] inBuf,
int inOffset,
int inLength,
byte[] macBuf,
int macOffset,
int macLength)
Verifies a MAC after updating last/only inBuf against the MAC in macBuf. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MACAlgorithm(jxta.security.cipher.Cipher cipherAlg, byte theType, jxta.security.hash.Hash theDigest) throws jxta.security.exceptions.CryptoException
Method Detail |
public java.lang.String getAlgorithmName()
public byte getAlgorithm()
public void setDebug()
public void clearDebug()
public int getLength()
public void init(byte theMode, jxta.security.cipher.Key theKey, byte[] privateKey) throws jxta.security.exceptions.CryptoException
public void update(byte[] inbuf, int offset, int length) throws jxta.security.exceptions.CryptoException
public int encrypt(byte[] inbuf, int offset, int inLength, byte[] macBuf, int macOffset) throws jxta.security.exceptions.CryptoException
public boolean verify(byte[] inBuf, int inOffset, int inLength, byte[] macBuf, int macOffset, int macLength) throws jxta.security.exceptions.CryptoException
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |