|
DataProtectionUnprotect Method
|
Decrypts the data in a specified byte array and returns a byte array that contains the decrypted data.
Namespace: GSF.Security.CryptographyAssembly: GSF.Core (in GSF.Core.dll) Version: 2.4.248-beta+a497a19de709fd99e2448886199a2c8824265ddf
Syntaxpublic static byte[] Unprotect(
byte[] encryptedData,
byte[] optionalEntropy,
DataProtectionScope scope
)
Public Shared Function Unprotect (
encryptedData As Byte(),
optionalEntropy As Byte(),
scope As DataProtectionScope
) As Byte()
public:
static array<unsigned char>^ Unprotect(
array<unsigned char>^ encryptedData,
array<unsigned char>^ optionalEntropy,
DataProtectionScope scope
)
static member Unprotect :
encryptedData : byte[] *
optionalEntropy : byte[] *
scope : DataProtectionScope -> byte[]
GSF.Security.Cryptography.DataProtection.Unprotect = function(encryptedData, optionalEntropy, scope);
View SourceParameters
- 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
ByteA byte array representing the decrypted data.
ExceptionsException | Condition |
---|
ArgumentNullException | The encryptedData parameter is null. |
CryptographicException | The decryption failed. |
NotSupportedException | The operating system does not support this method. |
OutOfMemoryException | Out of memory. |
See Also