public static bool CheckHash(string originalKey, string value, string hashSuffix) { if (!StringUtils.HasText(value)) { return(true); } string @string = UserPrefs.GetString(UserPrefs.CreateHashKey(originalKey), null); string a = UserPrefs.CreateHashValue(value, hashSuffix); return(a == @string); }
public static T GetXml <T>(string key, T defaultT) { if (UserPrefs.HasKey(key)) { string en = UserPrefs.GetString(key, ""); if (en == "") { return(defaultT); } string de = EncryptUtils.Base64Decrypt(en); XmlSerializer ss = new XmlSerializer(typeof(T)); StringReader sr = new StringReader(de); return((T)ss.Deserialize(sr)); } return(defaultT); }