MachineKeySection.Decryption 属性

定义

指定用于加密和解密表单身份验证数据的加密算法。

public:
 property System::String ^ Decryption { System::String ^ get(); void set(System::String ^ value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))]
[System.Configuration.ConfigurationProperty("decryption", DefaultValue="Auto")]
[System.Configuration.StringValidator(MinLength=1)]
public string Decryption { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.WhiteSpaceTrimStringConverter))>]
[<System.Configuration.ConfigurationProperty("decryption", DefaultValue="Auto")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Decryption : string with get, set
Public Property Decryption As String

属性值

一个值,该值指示用于加密和解密表单身份验证数据的算法。 (有关如何指定加密视图状态时使用的算法的信息,请参阅 Validation 属性。 Auto 是默认值。

属性

例外

所选值不是解密值之一。

注解

Decryption 属性支持以下解密值:

  • Auto(默认值)指定 ASP.NET 根据配置默认设置确定要使用的加密算法。

  • AES,指定 ASP.NET 使用 AES 算法加密数据。 AES 是加密数据的默认算法。

  • 3DES,指定 ASP.NET 使用 TripleDES 算法加密数据。

  • 自定义算法。

此属性通常在 Web.config 文件的 machineKey 元素的属性中decryption以声明方式设置。 有关详细信息,请参阅 machineKey 元素。

适用于

另请参阅