Dela via


DataProtectionCommonExtensions.Unprotect(IDataProtector, String) Method

Definition

Cryptographically unprotects a piece of protected data.

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

Parameters

protector
IDataProtector

The data protector to use for this operation.

protectedData
String

The protected data to unprotect.

Returns

The plaintext form of the protected data.

Exceptions

Thrown if protectedData is invalid or malformed.

Applies to