CryptExportKey (advapi32)
Last changed: -130.214.17.32

.
Summary
The CryptExportKey function exports a cryptographic key or a key pair from a cryptographic service provider (CSP) in a secure manner.

C# Signature:

[DllImport(@"advapi32.dll", SetLastError=true)]

static extern int CryptExportKey(int hKey, int hExpKey, int dwBlobType, int dwFlags, IntPtr pbData, ref int pdwDataLen);

User-Defined Types:

None.

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

AsymmetricAlgorithm.ToXmlString, SymmetricAlgorithm.Key

Documentation