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