private static bool DecryptBoolValue(string key, string encryptedInput, bool defaultValue) { if (encryptedInput.IndexOf(':') > -1) { string s = ObscuredPrefs.DeprecatedDecryptValue(encryptedInput); if (s == string.Empty) { return(defaultValue); } int result; int.TryParse(s, out result); ObscuredPrefs.SetBool(key, result == 1); return(result == 1); } byte[] numArray = ObscuredPrefs.DecryptData(key, encryptedInput); if (numArray == null) { return(defaultValue); } return(BitConverter.ToBoolean(numArray, 0)); }
private static bool DecryptBoolValue(string key, string encryptedInput, bool defaultValue) { if (encryptedInput.IndexOf(':') > -1) { string text = ObscuredPrefs.DeprecatedDecryptValue(encryptedInput); if (text == string.Empty) { return(defaultValue); } int num; int.TryParse(text, out num); ObscuredPrefs.SetBool(key, num == 1); return(num == 1); } else { byte[] array = ObscuredPrefs.DecryptData(key, encryptedInput); if (array == null) { return(defaultValue); } return(BitConverter.ToBoolean(array, 0)); } }