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