MachineKey.Decode(String, MachineKeyProtection) Метод

Определение

Внимание!

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.

Декодирует и/или проверяет данные, зашифрованные или предоставленные с помощью 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()

Параметры

encodedData
String

Зашифрованные данные для расшифровки и(или) проверки.

protectionOption
MachineKeyProtection

Указывает, должен ли шифроваться или хэшироваться параметр encodedData.

Возвращаемое значение

Byte[]

Массив Byte, представляющий расшифрованные данные.

Атрибуты

Примеры

Пример кода см. в обзоре MachineKey класса.

Комментарии

Сведения о том, какие алгоритмы шифрования и хэширования ASP.NET используются для расшифровки и проверки передаваемых данных, см. в разделе machineKey Element (ASP.NET Параметры Schema).

Применяется к