encodeBytes static method

String encodeBytes(
  1. Uint8List plainBytes, {
  2. required Object key,
  3. ToCryptoType type = ToCryptoType.chacha20Poly1305,
  4. Uint8List? aad,
})

Encodes raw bytes and returns Base64.

Implementation

static String encodeBytes(
  Uint8List plainBytes, {
  required Object key,
  ToCryptoType type = ToCryptoType.chacha20Poly1305,
  Uint8List? aad,
}) {
  return base64Encode(
      _encodeBytes(plainBytes, key: key, type: type, aad: aad));
}