Example #1
0
        public static object ObjectFromEncryptedJSON(string data)
        {
            WalletEncryptionV2 enc     = new WalletEncryptionV2();
            string             secured = enc.Decrypt(data);

            return(Newtonsoft.Json.JsonConvert.DeserializeObject(secured));
        }
Example #2
0
        public static T ObjectFromEncryptedJSON <T>(string data)
        {
            WalletEncryptionV2 enc = new WalletEncryptionV2();

            try
            {
                string secured = enc.Decrypt(data);
                return(Newtonsoft.Json.JsonConvert.DeserializeObject <T>(secured));
            }
            catch (Exception ex)
            {
                ex.ToString();
            }
            return(default(T));
        }