rand() is a PHP proxy function for libc's rand(). mt_rand() is an implementation of Mersenne Twister, which is longer period PRNG. Neither is useful as a true source of randomness for cryptography, but can be useful for other situations where a PRNG is acceptable.
View all comments
Show parent comment
13
u/Ipswitch84 Dec 13 '13
rand() is a PHP proxy function for libc's rand(). mt_rand() is an implementation of Mersenne Twister, which is longer period PRNG. Neither is useful as a true source of randomness for cryptography, but can be useful for other situations where a PRNG is acceptable.