encrypt static method
Future<Uint8List>
encrypt(
- Uint8List plaintext, {
- required Uint8List keyBytes,
- SteganographyCipher cipher = SteganographyCipher.aes256Gcm,
Implementation
static Future<Uint8List> encrypt(
Uint8List plaintext, {
required Uint8List keyBytes,
SteganographyCipher cipher = SteganographyCipher.aes256Gcm,
}) async {
switch (cipher) {
case SteganographyCipher.aes256Gcm:
return _encryptAesGcm(plaintext, keyBytes);
case SteganographyCipher.gostMagmaCtr:
return Future.value(_encryptMagmaCtr(plaintext, keyBytes));
}
}