CryptAlgorithm enum
Identificadores de algoritmos suportados pelo módulo crypt.
Usado no campo EncryptedPayload.algorithm para identificar o algoritmo utilizado na cifragem e despachar o decifrador correto em CryptUtil.decryptAny.
final payload = CryptUtil.encryptAesGcm(dados);
print(payload.algorithm); // CryptAlgorithm.aesGcm
print(payload.algorithm.value); // 'aes-gcm'
Values
- chacha20Poly1305 → const CryptAlgorithm
-
ChaCha20-Poly1305 — AEAD, padrão da lib (RFC 8439).
const CryptAlgorithm('chacha20-poly1305') - aesGcm → const CryptAlgorithm
-
AES-GCM — AEAD (NIST SP 800-38D). Suporta AES-128 e AES-256.
const CryptAlgorithm('aes-gcm') - aesCbc → const CryptAlgorithm
-
AES-CBC + PKCS#7 — não autenticado (NIST SP 800-38A).
const CryptAlgorithm('aes-cbc') - aesCtr → const CryptAlgorithm
-
AES-CTR — não autenticado (NIST SP 800-38A).
const CryptAlgorithm('aes-ctr')
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- index → int
-
A numeric identifier for the enumerated value.
no setterinherited
- name → String
-
Available on Enum, provided by the EnumName extension
The name of the enum value.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- value → String
-
Identificador serializado — usado em JSON e no campo
algorithmdo payload.final
Methods
-
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
Static Methods
-
fromString(
String s) → CryptAlgorithm - Converte uma string (vinda de JSON) para o enum correspondente.
Constants
-
values
→ const List<
CryptAlgorithm> - A constant List of the values in this enum, in order of their declaration.