MachineKey.Decode(String, MachineKeyProtection) Metod

Definition

Varning

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.

Avkodar och/eller validerar data som har krypterats eller försetts med en hashbaserad kod för meddelandeautentisering (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()

Parametrar

encodedData
String

Krypterade data som ska dekrypteras och/eller verifieras.

protectionOption
MachineKeyProtection

Anger om parametern encodedData ska krypteras och/eller hashas.

Returer

Byte[]

En Byte matris som representerar de dekrypterade data.

Attribut

Exempel

Ett kodexempel finns i klassöversikten MachineKey .

Kommentarer

Information om vilka krypterings- och hashalgoritmer som ASP.NET använder för att dekryptera och verifiera data som skickas finns i machineKey-element (ASP.NET inställningsschema).

Gäller för