Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there any random function other than rand() in c++?
#2
Not built-in, no. You could use the Mersenne Twister which, I believe, is built into Boost.

rand() is not a function that is suitable for cryptographic purposes anyway. Most programs use epoch time to seed the generator. Attackers can use that information to gain more information about the program or force an unrandom state.
Reply


Messages In This Thread
Is there any random function other than rand() in c++? - by Fiel - 2011-08-06, 01:31 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)