decrypt3 method

Future<Map<String, dynamic>?> decrypt3(
  1. String encryptedText
)

Decrypt 3

Implementation

Future<Map<String, dynamic>?> decrypt3(String encryptedText) async {
  final cipher = chacha20Poly1305Aead;

  /// Choose some 256-bit secret key
  final secretKey = SecretKey(__tokenSecretKey2.codeUnits);

  final message = splitMac(
      Nonce(<int>[54, 12, 89, 74, 5, 69, 8, 23, 14, 5, 89, 22]).list,
      base64.decode(encryptedText));

  final encrypted =
      await cipher.decrypt(message, secretKey: secretKey, aad: [12, 12, 10]);

  return json.decode(utf8.decode(encrypted));
}