Share via


ProtectedKey.CreateFromEncryptedKey Method

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Constructor method used to create a new ProtectedKey from an already encrypted symmetric key.

Namespace:  Microsoft.Practices.EnterpriseLibrary.Security.Cryptography
Assembly:  Microsoft.Practices.EnterpriseLibrary.Security.Cryptography (in Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.dll)

Syntax

'Declaration
PublicSharedFunctionCreateFromEncryptedKey ( _
    encryptedKeyAs Byte(), _
    dataProtectionScopeAs DataProtectionScope _
) As ProtectedKey
publicstatic ProtectedKey CreateFromEncryptedKey(
    byte[] encryptedKey,
    DataProtectionScope dataProtectionScope
)
public:
static ProtectedKey^ CreateFromEncryptedKey(
    array<unsigned char>^ encryptedKey, 
    DataProtectionScope dataProtectionScope
)
publicstaticfunctionCreateFromEncryptedKey(
    encryptedKey : byte[], 
    dataProtectionScope : DataProtectionScope
) : ProtectedKey

Parameters

  • encryptedKey
    Type: array<System.Byte>
    Encrypted key to protect.

Return Value

Initialized ProtectedKey containing the plaintext key protected with DPAPI.

See Also

ProtectedKey Class

Microsoft.Practices.EnterpriseLibrary.Security.Cryptography Namespace

Retired Content

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.