Bagikan melalui


MachineKey.Decode(String, MachineKeyProtection) Metode

Definisi

Perhatian

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.

Mendekode dan/atau memvalidasi data yang telah dienkripsi atau disediakan dengan kode autentikasi pesan berbasis hash (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()

Parameter

encodedData
String

Data terenkripsi untuk mendekripsi dan/atau memvalidasi.

protectionOption
MachineKeyProtection

Menunjukkan apakah encodedData parameter harus dienkripsi dan/atau di-hash.

Mengembalikan

Byte[]

Array Byte yang mewakili data yang didekripsi.

Atribut

Contoh

Untuk contoh kode, lihat gambaran MachineKey umum kelas.

Keterangan

Untuk informasi tentang algoritma enkripsi dan hashing mana yang ASP.NET gunakan untuk mendekripsi dan memvalidasi data yang diteruskan, lihat Elemen machineKey (Skema Pengaturan ASP.NET).

Berlaku untuk