aes256EncryptBytesAsStream method
Implementation
Future<Stream<List<int>>> aes256EncryptBytesAsStream({
required FlutterAesGcm algorithm,
required String rawKey,
required int rawKeyLength,
required Stream<List<int>> data,
}) async {
final secretKey = await _deriveKey(rawKey, rawKeyLength, [], 5);
final encryptedStream = await algorithm.encryptStream(
data,
secretKey: secretKey,
nonce: [],
onMac: (mac){}
);
return encryptedStream;
}