title: Exporting shared secret as BYTE array from BCRYPT_SECRET_HANDLE
body: <p>I'm implementing ECDHE using crypto next generation APIs (CNG). I generate public and private keys successfully. For pre-shared key, I use <strong><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa375496(v=vs.85).aspx" rel="nofollow noreferrer">BCryptSecretAgreement</a></strong> API, which returns me the <strong>pre-shared key secret handle</strong> (BCRYPT_SECRET_HANDLE). </p>
  
  <p>How can I export the pre-shared key as BYTE array from the BCRYPT_SECRET_HANDLE?</p>