MachineKey.Decode(String, MachineKeyProtection) Método

Definição

Cuidado

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.

Decodifica e/ou valida os dados que foram criptografados ou fornecidos com um HMAC (código de autenticação de mensagem baseado em hash).

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 criptografados a serem descriptografados e/ou validados.

protectionOption
MachineKeyProtection

Indica se o parâmetro encodedData deve ser criptografado e/ou transformado em hash.

Retornos

Byte[]

Uma matriz Byte que representa os dados descriptografados.

Atributos

Exemplos

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

Comentários

Para obter informações sobre quais algoritmos de criptografia e hash ASP.NET usa para descriptografar e validar os dados passados, consulte Elemento machineKey (esquema de configurações de ASP.NET).

Aplica-se a