MachineKey.Decode(String, MachineKeyProtection) Método

Definición

Precaución

This method is obsolete and is only provided for compatibility with existing code. It is recommended that new code use the Protect and Unprotect methods instead.

Descodifica o valida los datos cifrados o proporcionados con un código de autenticación de mensajes basado en hash (HMAC).

public:
 static cli::array <System::Byte> ^ Decode(System::String ^ encodedData, System::Web::Security::MachineKeyProtection protectionOption);
public static byte[] Decode(string encodedData, System.Web.Security.MachineKeyProtection protectionOption);
[System.Obsolete("This method is obsolete and is only provided for compatibility with existing code. It is recommended that new code use the Protect and Unprotect methods instead.")]
public static byte[] Decode(string encodedData, System.Web.Security.MachineKeyProtection protectionOption);
static member Decode : string * System.Web.Security.MachineKeyProtection -> byte[]
[<System.Obsolete("This method is obsolete and is only provided for compatibility with existing code. It is recommended that new code use the Protect and Unprotect methods instead.")>]
static member Decode : string * System.Web.Security.MachineKeyProtection -> byte[]
Public Shared Function Decode (encodedData As String, protectionOption As MachineKeyProtection) As Byte()

Parámetros

encodedData
String

Datos cifrados que se van a descifrar o validar.

protectionOption
MachineKeyProtection

Indica si el encodedData parámetro se debe cifrar o aplicar hash.

Devoluciones

Byte[]

Matriz Byte que representa los datos descifrados.

Atributos

Ejemplos

Para obtener un ejemplo de código, consulte la información general de la MachineKey clase.

Comentarios

Para obtener información sobre qué algoritmos de cifrado y hash ASP.NET usa para descifrar y validar los datos que se pasan, vea machineKey Element (esquema de configuración de ASP.NET).

Se aplica a