xorDecodeBytes method

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

bytes xor decryption

Implementation

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