private byte[] ExportKeyBlob(bool includePrivateParameters)
{
string blobType = includePrivateParameters ?
Interop.BCrypt.KeyBlobType.BCRYPT_ECCPRIVATE_BLOB :
Interop.BCrypt.KeyBlobType.BCRYPT_ECCPUBLIC_BLOB;
using (SafeNCryptKeyHandle keyHandle = GetDuplicatedKeyHandle())
{
return CngKeyLite.ExportKeyBlob(keyHandle, blobType);
}
}