xorDecodeStringToBytes method

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

bytes to string xor decryption

Implementation

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