encrypt static method

Future<Uint8List> encrypt(
  1. Uint8List plaintext, {
  2. required Uint8List keyBytes,
  3. 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));
  }
}