decryptPk1 static method

List<int> decryptPk1(
  1. Uint8List encodedData,
  2. int length,
  3. String key
)

Implementation

static List<int> decryptPk1(Uint8List encodedData, int length, String key) {
  List<int> keyList = key.codeUnits;
  List<int> res = [];
  for (int i = 0; i < length; i++) {
    final inter = assemblyPk1(keyList);
    final cfc = inter >> 8;
    final cfd = inter & 0xff;
    var c = encodedData[i];
    c ^= (cfc ^ cfd);
    for (int j = 0; j < keySize; j++) {
      keyList[j] ^= c;
    }
    res.add(c);
  }
  return res;
}