com.mindbright.security.mac
Class HMAC

java.lang.Object
  |
  +--com.mindbright.jce.crypto.MacSpi
        |
        +--com.mindbright.security.mac.HMAC
Direct Known Subclasses:
HMACMD5, HMACRIPEMD160, HMACSHA1

public class HMAC
extends com.mindbright.jce.crypto.MacSpi

Class implementing message authentication through keyed hashing (referred to as HMAC) described in rfc2104


Field Summary
protected  int blockSize
           
protected  int hashLength
           
protected  com.mindbright.jca.security.MessageDigest inner
           
protected  com.mindbright.jca.security.MessageDigest innerClone
           
protected  byte[] innerHash
           
protected  byte[] k_ipad
           
protected  byte[] k_opad
           
protected  int macLength
           
protected  com.mindbright.jca.security.MessageDigest outer
           
protected  com.mindbright.jca.security.MessageDigest outerClone
           
protected  byte[] outerHash
           
 
Constructor Summary
protected HMAC(java.lang.String hashAlgorithm)
           
 
Method Summary
protected  byte[] engineDoFinal()
           
protected  int engineGetMacLength()
           
protected  void engineInit(com.mindbright.jca.security.Key key, com.mindbright.jca.security.spec.AlgorithmParameterSpec params)
           
protected  void engineReset()
           
protected  void engineUpdate(byte input)
           
protected  void engineUpdate(byte[] input, int offset, int len)
           
 
Methods inherited from class com.mindbright.jce.crypto.MacSpi
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

macLength

protected int macLength

hashLength

protected int hashLength

blockSize

protected int blockSize

k_ipad

protected byte[] k_ipad

k_opad

protected byte[] k_opad

innerHash

protected byte[] innerHash

outerHash

protected byte[] outerHash

inner

protected com.mindbright.jca.security.MessageDigest inner

outer

protected com.mindbright.jca.security.MessageDigest outer

innerClone

protected com.mindbright.jca.security.MessageDigest innerClone

outerClone

protected com.mindbright.jca.security.MessageDigest outerClone
Constructor Detail

HMAC

protected HMAC(java.lang.String hashAlgorithm)
Method Detail

engineDoFinal

protected final byte[] engineDoFinal()
Specified by:
engineDoFinal in class com.mindbright.jce.crypto.MacSpi

engineGetMacLength

protected final int engineGetMacLength()
Specified by:
engineGetMacLength in class com.mindbright.jce.crypto.MacSpi

engineInit

protected final void engineInit(com.mindbright.jca.security.Key key,
                                com.mindbright.jca.security.spec.AlgorithmParameterSpec params)
                         throws com.mindbright.jca.security.InvalidKeyException,
                                com.mindbright.jca.security.InvalidAlgorithmParameterException
Specified by:
engineInit in class com.mindbright.jce.crypto.MacSpi
com.mindbright.jca.security.InvalidKeyException
com.mindbright.jca.security.InvalidAlgorithmParameterException

engineReset

protected final void engineReset()
Specified by:
engineReset in class com.mindbright.jce.crypto.MacSpi

engineUpdate

protected final void engineUpdate(byte input)
Specified by:
engineUpdate in class com.mindbright.jce.crypto.MacSpi

engineUpdate

protected final void engineUpdate(byte[] input,
                                  int offset,
                                  int len)
Specified by:
engineUpdate in class com.mindbright.jce.crypto.MacSpi