MachineKey.Encode(Byte[], 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 System::String ^ Encode(cli::array <System::Byte> ^ data, System::Web::Security::MachineKeyProtection protectionOption);
public static string Encode(byte[] data, 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 string Encode(byte[] data, System.Web.Security.MachineKeyProtection protectionOption);
static member Encode : byte[] * System.Web.Security.MachineKeyProtection -> string
[<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 Encode : byte[] * System.Web.Security.MachineKeyProtection -> string
Public Shared Function Encode (data As Byte(), protectionOption As MachineKeyProtection) As String

パラメーター

data
Byte[]

暗号化するデータ。

protectionOption
MachineKeyProtection

data パラメーターを暗号化するかハッシュするかを示します。

返品

暗号化された値、HMAC が追加された入力値、または HMAC が追加された入力値を暗号化した結果。

属性

コード例については、 MachineKey クラスの概要を参照してください。

注釈

渡されたデータの暗号化解除と検証に使用 ASP.NET 暗号化およびハッシュ アルゴリズムの詳細については、「machineKey 要素 (ASP.NET Settings Schema)を参照してください。

適用対象