public static string GetSecureString(string name, string defaultValue = "") { var value = GetString(DESEncryption.Encrypt(name, false)); if (!string.IsNullOrEmpty(value) && DESEncryption.Decrypt(value.ToString(), out string decrypted)) { return(decrypted); } return(defaultValue); }
public static void SetSecureString(string name, string value) { SetString(DESEncryption.Encrypt(name, false), DESEncryption.Encrypt(value)); }