encrypt3 method
Encrypt 3 For Token
Implementation
Future<String> encrypt3(Map<String, dynamic> data) async {
final cipher = chacha20Poly1305Aead;
/// Choose some 256-bit secret key
final secretKey = SecretKey(__tokenSecretKey2.codeUnits);
final encrypted = await cipher.encrypt(
utf8.encode(json.encode(data)),
secretKey: secretKey,
nonce: Nonce(<int>[54, 12, 89, 74, 5, 69, 8, 23, 14, 5, 89, 22]).list,
aad: [12, 12, 10],
);
return base64.encode(mergeMac(encrypted));
}