encrypt method
Encrypts plaintext in one call. For CTR the output has the same length.
Implementation
Uint8List encrypt(List<int> iv, List<int> plaintext) {
final s = encryptStream(iv);
final out = BytesBuilder(copy: false)
..add(s.update(plaintext))
..add(s.finish());
return out.takeBytes();
}