DataProtectionAdvancedExtensions.Unprotect Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Cryptographically unprotects a piece of protected data.
public:
[System::Runtime::CompilerServices::Extension]
static System::String ^ Unprotect(Microsoft::AspNetCore::DataProtection::ITimeLimitedDataProtector ^ protector, System::String ^ protectedData, [Runtime::InteropServices::Out] DateTimeOffset % expiration);
public static string Unprotect (this Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector protector, string protectedData, out DateTimeOffset expiration);
static member Unprotect : Microsoft.AspNetCore.DataProtection.ITimeLimitedDataProtector * string * DateTimeOffset -> string
<Extension()>
Public Function Unprotect (protector As ITimeLimitedDataProtector, protectedData As String, ByRef expiration As DateTimeOffset) As String
Parameters
- protector
- ITimeLimitedDataProtector
The protector to use.
- protectedData
- String
The protected data to unprotect.
- expiration
- DateTimeOffset
An 'out' parameter which upon a successful unprotect operation receives the expiration date of the payload.
Returns
The plaintext form of the protected data.
Exceptions
Thrown if protectedData
is invalid, malformed, or expired.