public static void SetStringEncrypt(string key, string value) { if (value == null) { PlayerPrefs.SetString(DESUtil.Encrypt(key, sKey), value); } else { PlayerPrefs.SetString(DESUtil.Encrypt(key, sKey), DESUtil.Encrypt(value, sKey)); } }
public static string GetStringDecrypt(string key, string defaultValue) { string value = null; if (defaultValue == null) { value = PlayerPrefs.GetString(DESUtil.Encrypt(key, sKey), defaultValue); } else { value = PlayerPrefs.GetString(DESUtil.Encrypt(key, sKey), DESUtil.Encrypt(defaultValue, sKey)); } if (value == null) { return(value); } return(DESUtil.Decrypt(value, sKey)); }
public static bool HasKeyEncrypt(string key) { return(PlayerPrefs.HasKey(DESUtil.Encrypt(key, sKey))); }
public static void DeleteKeyEncrypt(string key) { PlayerPrefs.DeleteKey(DESUtil.Encrypt(key, sKey)); }
public static bool WriteEncrypt(string filePath, byte[] data) { return(Write(filePath, DESUtil.Encrypt(data, sKey))); }