Hi,
The
CryptGenKey function[
^] and the other
Cryptography Functions[
^] are exported from Advapi32.dll and you can use them on OS WINVER >= 5.0
You should consider rephrasing your question... there are several different types of cryptography keys. If you are looking for a simple random sequence of bytes then perhaps the
CryptGenRandom function[
^] will do. The rand() function supposedly generates a relatively predictable sequence if an attacker knows the system time/uptime and other srand() input.
Best Wishes,
-David Delaune