Export (0) Print
Expand All
Expand Minimize

MachineKeyValidation Enumeration

Specifies the type of encryption process that is used for validation and encryption of data.

Namespace: System.Web.Configuration
Assembly: System.Web (in system.web.dll)

public enum MachineKeyValidation
public enum MachineKeyValidation
public enum MachineKeyValidation

 Member nameDescription
AESSpecifies that ASP.NET uses AES (Rijndael) encryption. 
MD5Specifies that ASP.NET uses the Message Digest 5 (MD5) hash algorithm. This algorithm performs better than SHA1. 
SHA1Specifies that ASP.NET uses the SHA1 hash algorithm. 

This is the default value. Use this algorithm for increased security.

TripleDESSpecifies that ASP.NET uses TripleDES (3DES) encryption. TripleDES uses three successive iterations of the DES algorithm. 

The MachineKeyValidation class provides four encryption types that ASP.NET uses for encrypting and validating data. The four encryption types are SHA1, MD5, TripleDES, and AES.

The following code example shows how to use the MachineKeyValidation class. This code example is part of a larger example provided for the MachineKeySection class.

// Set Validation property.
configSection.Validation = MachineKeyValidation.SHA1;

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft