xorDecodeBytesToString method
string to bytes xor decryption
Implementation
String xorDecodeBytesToString(List<int> bytes, {String? key}) {
this.key = key ?? this.key;
if (this.key != null && this.key!.isNotEmpty) {
return utf8.decode(_xor(bytes, utf8.encode(this.key!)));
} else {
return utf8.decode(_decrypt(bytes));
}
}