public static string GetString(string key, string defaultValue = default(string)) { var result = PlayerPrefs.GetString(MD5Util.GetMd5(key)); return(string.IsNullOrEmpty(result) ? defaultValue : AESUtil.Decrypt(result, AESKey.DefaultKey, AESKey.DefaultIV)); }
public static void DeleteKey(string key) { PlayerPrefs.DeleteKey(MD5Util.GetMd5(key)); }
public static void SetString(string key, string value) { PlayerPrefs.SetString(MD5Util.GetMd5(key), AESUtil.Encrypt(value, AESKey.DefaultKey, AESKey.DefaultIV)); }
public static bool HasKey(string key) { return(PlayerPrefs.HasKey(MD5Util.GetMd5(key))); }