Share via


DataProtectionCommonExtensions.Unprotect(IDataProtector, String) 方法

定義

以密碼編譯方式解除保護受保護的資料片段。

public:
[System::Runtime::CompilerServices::Extension]
 static System::String ^ Unprotect(Microsoft::AspNetCore::DataProtection::IDataProtector ^ protector, System::String ^ protectedData);
public static string Unprotect (this Microsoft.AspNetCore.DataProtection.IDataProtector protector, string protectedData);
static member Unprotect : Microsoft.AspNetCore.DataProtection.IDataProtector * string -> string
<Extension()>
Public Function Unprotect (protector As IDataProtector, protectedData As String) As String

參數

protector
IDataProtector

要用於這項作業的資料保護裝置。

protectedData
String

要取消保護的受保護資料。

傳回

受保護資料的純文字形式。

例外狀況

如果 protectedData 無效或格式不正確,則會擲回 。

適用於