Click or drag to resize

DataProtectionUnprotect Method

Decrypts the data in a specified byte array and returns a byte array that contains the decrypted data.

Namespace: GSF.Security.Cryptography
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.205-beta+5ef4169f3b1079d8b163dd363614f656bd140924
Syntax
public static byte[] Unprotect(
	byte[] encryptedData,
	byte[] optionalEntropy,
	DataProtectionScope scope
)
View Source

Parameters

encryptedData  Byte
A byte array containing data encrypted using the Protect(Byte, Byte, DataProtectionScope) method.
optionalEntropy  Byte
An optional additional byte array that was used to encrypt the data, or null if the additional byte array was not used.
scope  DataProtectionScope
One of the enumeration values that specifies the scope of data protection that was used to encrypt the data.

Return Value

Byte
A byte array representing the decrypted data.
Exceptions
ExceptionCondition
ArgumentNullExceptionThe encryptedData parameter is null.
CryptographicExceptionThe decryption failed.
NotSupportedExceptionThe operating system does not support this method.
OutOfMemoryExceptionOut of memory.
See Also