MachineKey.Unprotect Method (Byte[], String[])
.NET Framework (current version)
Unprotects the specified data, which was protected by the Protect method.
Assembly: System.Web (in System.Web.dll)
Parameters
- protectedData
-
Type:
System.Byte[]
The ciphertext data to unprotect.
- purposes
-
Type:
System.String[]
A list of purposes that describe what the data is meant for. This must be the same value that was passed to the Protect method when the data was protected.
| Exception | Condition |
|---|---|
| ArgumentNullException | The protectedData parameter is null. |
| ArgumentException | The purposes array contains one or more whitespace-only entries. |
| CryptographicException | Possible causes include the following:
|
.NET Framework
Available since 4.5
Available since 4.5
Show: