AES class

AES block cipher (128/192/256-bit keys), operating on single 16-byte blocks. Wrap in CBC or CTR for a mode of operation.

Implemented types
Implementers

Constructors

AES(List<int> key, [bool noDecryption = false])
Creates an AES cipher keyed with key. Pass noDecryption to skip building the decryption key schedule.

Properties

blockSize → int
Block size for AES cipher
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clean() → AES
Zeroes and releases both key schedules.
override
decryptBlock(List<int> src, [List<int>? dst]) → BuBytes
Decrypts one 16-byte block, writing into dst if given. Throws if this instance was created with noDecryption.
override
encryptBlock(List<int> src, [List<int>? dst]) → BuBytes
Encrypts one 16-byte block, writing into dst if given.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setKey(List<int> key, [bool noDecryption = false]) → AES
Re-keys this instance. key must be 16, 24, or 32 bytes, and the same size this instance was created with.
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

allowedKeysLength → const List<int>