encrypt method

Iterable<int> encrypt(
  1. dynamic input, {
  2. Padder? padder,
})

Implementation

Iterable<int> encrypt(/* String | Iterable<int> */ input, {Padder? padder}) {
  Iterable<int> inputBytes;
  if (input is String) {
    inputBytes = utf8.encode(input);
  } else if (input is Iterable<int>) {
    inputBytes = input;
  } else {
    throw ArgumentError('Should be String or List<int>');
  }
  if (padder != null) {
    inputBytes = padder.pad(blockSize, inputBytes);
  }
  return engine.process(inputBytes);
}