Additional top-level class in compilation unit: MacCFBBlockCipher.
| Modifier and Type | Field and Description |
|---|---|
| private byte[] | |
| private int | |
| private MacCFBBlockCipher | |
| private byte[] | |
| private int | |
| private BlockCipherPadding |
| Access | Constructor and Description |
|---|---|
| public | CFBBlockCipherMac(BlockCipher
the cipher to be used as the basis of the MAC generation. cipher)create a standard MAC based on a CFB block cipher. |
| public | CFBBlockCipherMac(BlockCipher
the cipher to be used as the basis of the MAC generation. cipher, BlockCipherPadding the padding to be used. padding)create a standard MAC based on a CFB block cipher. |
| public | CFBBlockCipherMac(BlockCipher
the cipher to be used as the basis of the MAC generation. cipher, int the size of an output block produced by the CFB mode. cfbBitSize, int the size of the MAC in bits, must be a multiple of 8. macSizeInBits)create a standard MAC based on a block cipher with the size of the MAC been given in bits. |
| public | CFBBlockCipherMac(BlockCipher
the cipher to be used as the basis of the MAC generation. cipher, int the size of an output block produced by the CFB mode. cfbBitSize, int the size of the MAC in bits, must be a multiple of 8. macSizeInBits, BlockCipherPadding a padding to be used. padding)create a standard MAC based on a block cipher with the size of the MAC been given in bits. |
| Modifier and Type | Method and Description |
|---|---|
| public int | doFinal(byte[]
the array the MAC is to be output to. out, int the offset into the out buffer the output is to start at. outOff)Implements org. Compute the final stage of the MAC writing the output to the out parameter. |
| public String | getAlgorithmName()
Implements org. Return the name of the algorithm the MAC implements. |
| public int | getMacSize()
Implements org. Return the block size for this MAC (in bytes). |
| public void | init(CipherParameters
the key and other data required by the MAC. params)Implements org. Initialise the MAC. |
| public void | |
| public void | update(byte
the byte to be processed. in)Implements org. add a single byte to the mac for processing. |
| public void | update(byte[]
the array containing the input. in, int the index in the array the data begins at. inOff, int the length of the input starting at inOff. len)Implements org.
|
| buf | back to summary |
|---|---|
| private byte[] buf | |
| bufOff | back to summary |
|---|---|
| private int bufOff | |
| cipher | back to summary |
|---|---|
| private MacCFBBlockCipher cipher | |
| mac | back to summary |
|---|---|
| private byte[] mac | |
| macSize | back to summary |
|---|---|
| private int macSize | |
| padding | back to summary |
|---|---|
| private BlockCipherPadding padding | |
| CFBBlockCipherMac | back to summary |
|---|---|
| public CFBBlockCipherMac(BlockCipher cipher) create a standard MAC based on a CFB block cipher. This will produce an authentication code half the length of the block size of the cipher, with the CFB mode set to 8 bits.
| |
| CFBBlockCipherMac | back to summary |
|---|---|
| public CFBBlockCipherMac(BlockCipher cipher, BlockCipherPadding padding) create a standard MAC based on a CFB block cipher. This will produce an authentication code half the length of the block size of the cipher, with the CFB mode set to 8 bits.
| |
| CFBBlockCipherMac | back to summary |
|---|---|
| public CFBBlockCipherMac(BlockCipher cipher, int cfbBitSize, int macSizeInBits) create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CFB mode as the basis for the MAC generation. Note the size of the MAC must be at least 24 bits (FIPS Publication 81), or 16 bits if being used as a data authenticator (FIPS Publication 113), and in general should be less than the size of the block cipher as it reduces the chance of an exhaustive attack (see Handbook of Applied Cryptography).
| |
| CFBBlockCipherMac | back to summary |
|---|---|
| public CFBBlockCipherMac(BlockCipher cipher, int cfbBitSize, int macSizeInBits, BlockCipherPadding padding) create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CFB mode as the basis for the MAC generation. Note the size of the MAC must be at least 24 bits (FIPS Publication 81), or 16 bits if being used as a data authenticator (FIPS Publication 113), and in general should be less than the size of the block cipher as it reduces the chance of an exhaustive attack (see Handbook of Applied Cryptography).
| |
| doFinal | back to summary |
|---|---|
| public int doFinal(byte[] out, int outOff) Implements org. Doc from org. Compute 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.
| |
| getAlgorithmName | back to summary |
|---|---|
| public String getAlgorithmName() Implements org. Doc from org. Return the name of the algorithm the MAC implements.
| |
| getMacSize | back to summary |
|---|---|
| public int getMacSize() Implements org. Doc from org. Return the block size for this MAC (in bytes).
| |
| init | back to summary |
|---|---|
| public void init(CipherParameters params) Implements org. Doc from org. Initialise the MAC.
| |
| reset | back to summary |
|---|---|
| public void reset() Implements org. Reset the mac generator. | |
| update | back to summary |
|---|---|
| public void update(byte in) Implements org. Doc from org. add a single byte to the mac for processing.
| |
| update | back to summary |
|---|---|
| public void update(byte[] in, int inOff, int len) Implements org.
| |