CCMBlockCipher class

Implementation of the CCM block cipher mode. CCM is authenticated, meaning that you can pass AEAD data (and that appending a MAC of the ciphertext is unnecessary).

Constructors

CCMBlockCipher(BlockCipher underlyingCipher)

Properties

aad Uint8List?
The additional authenticated data as set by the initialization
getter/setter pair
algorithmName String
Get this algorithm's standard name.
no setteroverride
associatedText BytesBuilder
getter/setter pair
blockSize int
Get this ciphers's block size.
no setterinherited
data BytesBuilder
getter/setter pair
forEncryption bool
True if initialized for encryption
no setter
hashCode int
The hash code for this object.
no setterinherited
mac Uint8List
The value of the authentication tag associated with the last processed data
no setter
macSize int
The length in bytes of the authentication tag
getter/setter pair
nonce Uint8List
The nonce or iv as set by the initialization
getter/setter pair
remainingInput Uint8List
Any remaining input yet to be processed
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
underlyingCipher BlockCipher
The underlying cipher
no setterinherited

Methods

doFinal(Uint8List out, int outOff) int
Finish the operation either appending or verifying the MAC at the end of the data.
override
getOutputSize(int length) int
init(bool forEncryption, covariant CipherParameters params) → void
Init the cipher with its initialization params. The type of CipherParameters depends on the algorithm being used (see the documentation of each implementation to find out more).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
prepare(KeyParameter keyParam) → void
Prepare for a stream of data. This method is called during initialization and reset.
process(Uint8List data) Uint8List
Process a whole block of blockSize bytes stored in data at once, returning the result in a byte array.
inherited
processAADBytes(Uint8List inp, int inpOff, int len) → void
Processes the additional authentication data
processBlock(Uint8List inp, int inpOff, Uint8List out, int outOff) int
Process a whole block of data given by inp and starting at offset inpOff.
override
processBytes(Uint8List inp, int inpOff, int len, Uint8List out, int outOff) int
Process len bytes from inp starting at offset inpOff and output the result to out at offset outOff.
reset() → void
Reset the cipher to its original state.
toString() String
A string representation of this object.
inherited
validateMac() → void
When decrypting, validates the generated authentication tag with the one in the input stream. When not equal throws InvalidCipherTextException. This method should be called from the doFinal method.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

factoryConfig → FactoryConfig
final