Class HMac
java.lang.Object
org.bouncycastle.crypto.macs.HMac
- All Implemented Interfaces:
Mac
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoFinal(byte[] out, int outOff) Compute the final stage of the MAC writing the output to the out parameter.Return the name of the algorithm the MAC implements.intReturn the block size for this MAC (in bytes).voidinit(CipherParameters params) Initialise the MAC.voidreset()Reset the mac generator.voidupdate(byte in) add a single byte to the mac for processing.voidupdate(byte[] in, int inOff, int len)
-
Constructor Details
-
HMac
Base constructor for one of the standard digest algorithms that the byteLength of the algorithm is know for.- Parameters:
digest- the digest.
-
-
Method Details
-
getAlgorithmName
Description copied from interface:MacReturn the name of the algorithm the MAC implements.- Specified by:
getAlgorithmNamein interfaceMac- Returns:
- the name of the algorithm the MAC implements.
-
getUnderlyingDigest
-
init
Description copied from interface:MacInitialise the MAC. -
getMacSize
public int getMacSize()Description copied from interface:MacReturn the block size for this MAC (in bytes).- Specified by:
getMacSizein interfaceMac- Returns:
- the block size for this MAC in bytes.
-
update
-
update
-
doFinal
public int doFinal(byte[] out, int outOff) Description copied from interface:MacCompute the final stage of the MAC writing the output to the out parameter.doFinal leaves the MAC in the same state it was after the last init.
-
reset
-