I am kind of stuck, I want to generate new pair of public and private keys. But I can't find a way to extract them.
I used this: (C++)
status = BCryptOpenAlgorithmProvider(&hAlg,
BCRYPT_RSA_ALGORITHM,
NULL,
0);
if (status) {}
status = BCryptGenerateKeyPair(hAlg, &hKey, 1024, 0);
if (status) {}
status = BCryptFinalizeKeyPair(&hKey, 0);
if (status) {}
(dont mind the status, ill check it later :-) ) but now I want to extract the pair of keys, cant find an example or matching function I might do something wrong, but what?