Hi there!
This patch modifies the rng functionality on usage with
MSVC. Now the method "CryptGenRandom" is used for the
random numbers such as the generated keys and so on.
The patch is based on version 1.8 of rand_source.c. In
the attached file you find a diff and the full source
of rand_source.c
Hints and notes to this version are welcome, so please
let me know if you got suggestions. Thx
Yours
Yves
Logged In: YES
user_id=1483001
Sorry, forgot the attachement...
Logged In: YES
user_id=1483001
Another sorry, I forgot the changes for MSVC V7+ (2003). But
now it should be right.
Yours
Yves
rand_source.c for MSVC with CryptGenRandom
The existing code uses rand_s on Visual Studio 2005 or later. Since 2005 has just been end-of-life'd -- the oldest compiler still available from Microsoft is Visual Studio 2008 -- I don't know if it's still necessary to add code that's only used on exactly one major release of Visual Studio (.NET, from 2002/2003).
Sorry, last comment was me (wasn't logged in).