Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is there any library provided by default with windows (any version) which can generate random keys (RNGs) without the use of .NET framework.
Posted

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
 
Share this answer
 
ıf you search generate random keys library or function, you use #include <stdlib.h> library and, you can use rand() function.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 17-Oct-11 15:16pm    
#include what? :-)
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900