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 設定スキーマ)」を参照してください。

適用対象