Share via


MachineKey.Decode(String, MachineKeyProtection) Methode

Definition

Achtung

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.

Decodiert und/oder überprüft Daten, die verschlüsselt wurden oder mit einem hashbasierten Meldungsauthentifizierungscode (HMAC) bereitgestellt wurden.

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()

Parameter

encodedData
String

Die verschlüsselten Daten, die verschlüsselt und/oder überprüft werden sollen.

protectionOption
MachineKeyProtection

Gibt an, ob der encodedData-Parameter verschlüsselt werden soll, und/oder Hash.

Gibt zurück

Byte[]

Ein Byte-Array, das die entschlüsselten Daten darstellt.

Attribute

Beispiele

Ein Codebeispiel finden Sie in der MachineKey Klassenübersicht.

Hinweise

Informationen dazu, welche Verschlüsselungs- und Hashalgorithmen ASP.NET zum Entschlüsseln und Überprüfen der übergebenen Daten verwendet werden, finden Sie unter machineKey Element (ASP.NET Einstellungen Schema).

Gilt für