Partager via


MachineKey.Decode(String, MachineKeyProtection) Méthode

Définition

Attention

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.

Décode et/ou valide des données qui ont été chiffrées ou fournies avec du code HMAC (Hash-based Message Authentication Code).

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

Paramètres

encodedData
String

Données chiffrées à déchiffrer et/ou à valider.

protectionOption
MachineKeyProtection

Indique si le paramètre encodedData doit être chiffré et/ou haché.

Retours

Byte[]

Un tableau Byte qui représente les données déchiffrées.

Attributs

Exemples

Pour obtenir un exemple de code, consultez la vue d’ensemble de la MachineKey classe.

Remarques

Pour plus d’informations sur les algorithmes de chiffrement et de hachage que ASP.NET utilise pour déchiffrer et valider les données passées, consultez machineKey Element (ASP.NET Paramètres Schema).

S’applique à