Merge remote-tracking branch 'purple/openssl' into openssl

This commit is contained in:
Jeff Becker 2018-11-24 10:08:12 -05:00
commit 16b3108719
No known key found for this signature in database
GPG key ID: F357B3B42F6F9B05
66 changed files with 741 additions and 224 deletions

View file

@ -341,6 +341,16 @@ namespace crypto
#endif
}
void X25519Keys::GetPrivateKey (uint8_t * priv) const
{
#if OPENSSL_X25519
size_t len = 32;
EVP_PKEY_get_raw_private_key (m_Pkey, priv, &len);
#else
memcpy (priv, m_PrivateKey, 32);
#endif
}
// ElGamal
void ElGamalEncrypt (const uint8_t * key, const uint8_t * data, uint8_t * encrypted, BN_CTX * ctx, bool zeroPadding)
{