encryptToBase64 static method

String encryptToBase64(
  1. String text, {
  2. Uint8List? key,
  3. Uint8List? nonce,
  4. List<int>? aad,
})

Criptografa text e retorna o payload como string base64.

final b64 = CryptUtil.encryptToBase64('segredo', key: key);
final txt = CryptUtil.decryptFromBase64(b64);

Implementation

static String encryptToBase64(
  String text, {
  Uint8List? key,
  Uint8List? nonce,
  List<int>? aad,
}) =>
    encryptText(text, key: key, nonce: nonce, aad: aad).toBase64();