org.bouncycastle.crypto.macs

Class HMac

public class HMac extends Object implements Mac

HMAC implementation based on RFC2104 H(K XOR opad, H(K XOR ipad, text))
Constructor Summary
HMac(Digest digest)
Base constructor for one of the standard digest algorithms that the byteLength of the algorithm is know for.
Method Summary
intdoFinal(byte[] out, int outOff)
StringgetAlgorithmName()
intgetMacSize()
DigestgetUnderlyingDigest()
voidinit(CipherParameters params)
voidreset()
Reset the mac generator.
voidupdate(byte in)
voidupdate(byte[] in, int inOff, int len)

Constructor Detail

HMac

public HMac(Digest digest)
Base constructor for one of the standard digest algorithms that the byteLength of the algorithm is know for.

Parameters: digest the digest.

Method Detail

doFinal

public int doFinal(byte[] out, int outOff)

getAlgorithmName

public String getAlgorithmName()

getMacSize

public int getMacSize()

getUnderlyingDigest

public Digest getUnderlyingDigest()

init

public void init(CipherParameters params)

reset

public void reset()
Reset the mac generator.

update

public void update(byte in)

update

public void update(byte[] in, int inOff, int len)