MachineKey.Decode(String, MachineKeyProtection) Método

Definição

Atenção

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 e/ou valida dados que foram encriptados ou fornecidos com um código de autenticação de mensagens baseado em 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

Os dados encriptados para desencriptar e/ou validar.

protectionOption
MachineKeyProtection

Indica se o encodedData parâmetro deve ser encriptado e/ou com hash.

Devoluções

Byte[]

Um Byte array que representa os dados desencriptados.

Atributos

Exemplos

Para um exemplo de código, veja a visão geral da MachineKey classe.

Observações

Para informações sobre quais algoritmos de encriptação e hash ASP.NET utiliza para desencriptar e validar os dados que são passados, veja machineKey Element (ASP.NET Settings Schema).

Aplica-se a