EncryptedData class
Result of AES-GCM encryption containing ciphertext and nonce.
The ciphertext includes the authentication tag at the end.
Constructors
- EncryptedData({required Uint8List ciphertext, required Uint8List nonce})
-
Creates an EncryptedData with the ciphertext and nonce.
const
Properties
- ciphertext → Uint8List
-
The encrypted ciphertext (includes 16-byte auth tag at end for AES-GCM).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- nonce → Uint8List
-
The 12-byte nonce/IV used for encryption.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBytes(
) → Uint8List - Serializes to bytes: nonce (12 bytes) + ciphertext.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromBytes(
Uint8List bytes) → EncryptedData - Deserializes from bytes.