pandoraDecrypt function

String pandoraDecrypt(
  1. String data,
  2. Converter<String, Uint8List> decrypter, [
  3. int drop = 0
])

Decrypts a request/response with the given decrypter.

Implementation

String pandoraDecrypt(
  String data,
  Converter<String, Uint8List> decrypter, [
  int drop = 0,
]) {
  final decryptedData = decrypter.convert(data);
  return utf8.decode(
    decryptedData.sublist(
      drop,
      decryptedData.length - getPKCS5PadCount(decryptedData),
    ),
  );
}