xorDecodeStringToBytes method

List<int> xorDecodeStringToBytes(
  1. String content, {
  2. String? key,
})

bytes to string xor decryption

Implementation

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