| org.bouncycastle.crypto.Mac
All known Subclasses: org.bouncycastle.crypto.macs.ISO9797Alg3Mac, org.bouncycastle.crypto.macs.GOST28147Mac, org.bouncycastle.crypto.macs.CMac, org.bouncycastle.crypto.macs.CBCBlockCipherMac, org.bouncycastle.crypto.macs.OldHMac, org.bouncycastle.crypto.macs.BlockCipherMac, org.bouncycastle.crypto.macs.HMac,
Mac | public interface Mac (Code) | | The base interface for implementations of message authentication codes (MACs).
|
Method Summary | |
public int | doFinal(byte[] out, int outOff) Compute the final statge of the MAC writing the output to the out
parameter. | 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) Initialise the MAC. | public void | reset() Reset the MAC. | public void | update(byte in) add a single byte to the mac for processing. | public void | update(byte[] in, int inOff, int len) |
doFinal | public int doFinal(byte[] out, int outOff) throws DataLengthException, IllegalStateException(Code) | | 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.
Parameters: out - the array the MAC is to be output to. Parameters: outOff - the offset into the out buffer the output is to start at. exception: DataLengthException - if there isn't enough space in out. exception: IllegalStateException - if the MAC is not initialised. |
getAlgorithmName | public String getAlgorithmName()(Code) | | Return the name of the algorithm the MAC implements.
the name of the algorithm the MAC implements. |
getMacSize | public int getMacSize()(Code) | | Return the block size for this MAC (in bytes).
the block size for this MAC in bytes. |
reset | public void reset()(Code) | | 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).
|
|
|