I want to make application windows exchange pair key and use it in openssl php , how I can change BCRYPT_RSAKEY_BLOB to openSSL ?
I used but RSA SEQUENCE still deffrent :
PBYTE pbASN;
// Length of the ASN.1 encoded key
DWORD cbASN;
// Generate the key
CryptEncodeObjectEx(X509_ASN_ENCODING, PKCS_RSA_PRIVATE_KEY, pbPrivateKeyBlob, CRYPT_ENCODE_ALLOC_FLAG, NULL, &pbASN, &cbASN) {
std::cout << "CryptEncodeObjectEx" << GetLastError() << std::endl;
}