AesCbc class

Implementação de AES-CBC (NIST SP 800-38A) com padding PKCS#7.

⚠️ CBC não é autenticado — considere AES-GCM para AEAD.

final cbc = AesCbc(key: key32, iv: iv16);
final payload = cbc.encrypt(utf8.encode('dados'));
final texto  = utf8.decode(cbc.decrypt(payload));

Constructors

AesCbc({required Uint8List key, required Uint8List iv})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
iv Uint8List
final
key Uint8List
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

decrypt(EncryptedPayload payload) List<int>
Decifra payload e retorna o plaintext sem padding.
encrypt(List<int> plaintext) EncryptedPayload
Cifra plaintext com PKCS#7 e retorna EncryptedPayload.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Constants

ivLength → const int