Exemple #1
0
        public override string ToString()
        {
            var json = JsonSerializer.Serialize(this);

            return(ChatEncryption.EncryptData(json, ChatEncryption.Key));
        }
Exemple #2
0
 public static ChatMessage Parse(string data)
 {
     ChatEncryption.DecryptData(data, ChatEncryption.Key, out var json);
     return(JsonSerializer.Deserialize <ChatMessage>(json) !);
 }