Comparteix a través de


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 y/o valida datos que se han cifrado o se han proporcionado con un código de autenticación de mensaje 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

Los datos cifrados para descifrar o validar.

protectionOption
MachineKeyProtection

Indica si el parámetro encodedData se debería cifrar o someterse a un algoritmo hash.

Devoluciones

Byte[]

Una 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 (ASP.NET Settings Schema)).

Se aplica a