Exemplo n.º 1
0
        private static Profile FromJson(JSONNode json)
        {
            var profile = new Profile
            {
                BestScore     = ProtectedValue.FromJson(json["BestScore"]),
                Sound         = ProtectedValue.FromJson(json["Sound"]),
                UnlockedItems = json["UnlockedItems"].Childs.Select(i => i.Value.ToEnum <BallId>()).ToList()
            };

            return(profile);
        }
Exemplo n.º 2
0
 public static ProtectedValue Decrypt(ProtectedValue value, ProtectedValue password)
 {
     return new ProtectedValue(Decrypt(value.String, password.String));
 }
Exemplo n.º 3
0
 public static ProtectedValue Encrypt(ProtectedValue value, ProtectedValue password)
 {
     return new ProtectedValue(Encrypt(Encoding.UTF8.GetBytes(value.String), password.String));
 }