MachineKey.Decode(String, MachineKeyProtection) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
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 元素 (ASP.NET 設定架構) 。