Save This Page
Home » crypto-143 » org.bouncycastle.crypto » [javadoc | source]
public interface: Mac [javadoc | source]

All Known Implementing Classes:
    ISO9797Alg3Mac, CBCBlockCipherMac, CFBBlockCipherMac, GOST28147Mac, VMPCMac, CMac, HMac, OldHMac, BlockCipherMac

The base interface for implementations of message authentication codes (MACs).
Method from org.bouncycastle.crypto.Mac Summary:
doFinal,   getAlgorithmName,   getMacSize,   init,   reset,   update,   update
Method from org.bouncycastle.crypto.Mac Detail:
 public int doFinal(byte[] out,
    int outOff) throws DataLengthException, IllegalStateException
    Compute the final statge of the MAC writing the output to the out parameter.

    doFinal leaves the MAC in the same state it was after the last init.

 public String getAlgorithmName()
    Return the name of the algorithm the MAC implements.
 public int getMacSize()
    Return the block size for this MAC (in bytes).
 public  void init(CipherParameters params) throws IllegalArgumentException
    Initialise the MAC.
 public  void reset()
    Reset the MAC. At the end of resetting the MAC should be in the in the same state it was after the last init (if there was one).
 public  void update(byte in) throws IllegalStateException
    add a single byte to the mac for processing.
 public  void update(byte[] in,
    int inOff,
    int len) throws DataLengthException, IllegalStateException