xorDecodeBytes method

List<int> xorDecodeBytes(
  1. List<int> bytes, {
  2. String? key,
})

bytes xor decryption

Implementation

List<int> xorDecodeBytes(List<int> bytes, {String? key}) {
  this.key = key ?? this.key;
  if (this.key != null && this.key!.isNotEmpty) {
    return _xor(bytes, utf8.encode(this.key!));
  } else {
    return _decrypt(bytes);
  }
}