Key. Unprotect(Byte, String) Method
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.
Unprotects the specified data, which was protected by the Protect(Byte, String) method.
public: static cli::array <System::Byte> ^ Unprotect(cli::array <System::Byte> ^ protectedData, ... cli::array <System::String ^> ^ purposes);
public static byte Unprotect (byte protectedData, params string purposes);
static member Unprotect : byte * string -> byte
Public Shared Function Unprotect (protectedData As Byte(), ParamArray purposes As String()) As Byte()
The ciphertext data to unprotect.
A list of purposes that describe what the data is meant for. This must be the same value that was passed to the Protect(Byte, String) method when the data was protected.
The plaintext data.
protectedData parameter is null.
The purposes array contains one or more white-space-only entries.
Possible causes include the following:
The protected data was tampered with.
The value of the
purposesparameter is not the same as the value that was specified when the data was protected.
The application is deployed to more than one server and is using auto-generated encryption keys.
For information about this method, see the Protect method.