xorDecode method

String xorDecode(
  1. String content, {
  2. String? key,
})

string xor decryption

Implementation

String xorDecode(String content, {String? key}) {
  this.key = key ?? this.key;
  if (this.key != null && this.key!.isNotEmpty) {
    return utf8.decode(_xor(base64Decode(content), utf8.encode(this.key!)));
  } else {
    return utf8.decode(_decrypt(base64Decode(content)));
  }
}