CBCBlockCipherMac class
standard CBC Block Cipher MAC - if no padding is specified the default of pad of zeroes is used.
- Implemented types
Constructors
- CBCBlockCipherMac(BlockCipher cipher, int macSizeInBits, Padding? padding)
- create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CBC mode as the basis for the MAC generation.
- CBCBlockCipherMac.fromCipher(BlockCipher cipher)
- create a standard MAC based on a CBC block cipher. This will produce an authentication code half the length of the block size of the cipher.
- CBCBlockCipherMac.fromCipherAndMacSize(BlockCipher cipher, int macSizeInBits)
- create a standard MAC based on a block cipher with the size of the MAC been given in bits. This class uses CBC mode as the basis for the MAC generation.
- CBCBlockCipherMac.fromCipherAndPadding(BlockCipher cipher, Padding? padding)
- create a standard MAC based on a CBC block cipher. This will produce an authentication code half the length of the block size of the cipher.
Properties
- algorithmName → String
-
Get this algorithm's standard name.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- macSize → int
-
Get this MAC's output size.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
doFinal(
Uint8List out, int outOff) → int -
Store the MAC of previously given data in buffer
out
starting at offsetoutOff
. This method returns the size of the digest.override -
init(
CipherParameters params) → void -
Init the MAC with its initialization
params
. The type of CipherParameters depends on the algorithm being used (see the documentation of each implementation to find out more).override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
process(
Uint8List data) → Uint8List -
Process a whole block of
data
at once, returning the result in a new byte array.inherited -
reset(
) → void -
Reset the mac generator.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Uint8List inp, int inOff, int len) → void -
Add
len
bytes of data contained ininp
, starting at positioninpOff
to the MAC'ed input.override -
updateByte(
int inp) → void -
Add one byte of data to the MAC input.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- factoryConfig → FactoryConfig
-
final