MachineKey.Decode(String, MachineKeyProtection) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
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
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).