EncryptedPayload class
Resultado de uma operação de criptografia simétrica.
Contém todos os dados necessários para decriptação:
- ciphertext : dados cifrados
- key : chave usada na cifragem
- tag : tag de autenticação (MAC) — pode ser vazia em modos sem autenticação
- nonce : nonce / IV usado na cifragem
- aad : dados adicionais autenticados (pode ser vazio)
- algorithm : identificador do algoritmo usado (ex.: 'chacha20-poly1305', 'aes-gcm')
Constructors
- EncryptedPayload({required Uint8List ciphertext, required Uint8List key, required Uint8List tag, required Uint8List nonce, required Uint8List aad, String algorithm = 'chacha20-poly1305'})
-
const
- EncryptedPayload.fromBase64(String encoded)
-
Deserializa um EncryptedPayload a partir de uma string JSON base64.
factory
-
EncryptedPayload.fromJson(Map<
String, dynamic> json) -
Deserializa um EncryptedPayload a partir de um Map JSON.
factory
Properties
- aad → Uint8List
-
final
- algorithm → String
-
Identificador do algoritmo de criptografia utilizado.
final
- ciphertext → Uint8List
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Uint8List
-
final
- nonce → Uint8List
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tag → Uint8List
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toBase64(
) → String - Serializa o payload inteiro para uma string JSON base64.
-
toJson(
) → Map< String, dynamic> - Serializa o payload para um Map JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited