View Single Post
Old 12-15-2012, 06:40 PM   PM User | #19
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
If you use RandRange you can specify which algorithm to use. Or use rand() with randomize() to seed the random number generator.

Quote:
RandRange(number1, number2[, algorithm])

History
ColdFusion MX 7: Added the algorithm parameter.

See also
Rand, Randomize

Parameters
number1, number2
Integer numbers. If the numbers are not in the range -2,147,483,648 - 2,147,483,647, ColdFusion generates an error.

algorithm
(Optional) The algorithm to use to generated the random number. ColdFusion installs a cryptography library with the following algorithms:

CFMX_COMPAT: the algorithm used in ColdFusion (default).
SHA1PRNG: generates a number using the Sun Java SHA1PRNG algorithm. This algorithm provides greater randomness than the default algorithm
IBMSecureRandom: for IBM WebSphere (IBM JVM does not support the SHA1PRNG algorithm.)
Presumably the querystring-parameter you are passing to the other page, which is not currently used, can be used as the seed.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS

Last edited by AndrewGSW; 12-15-2012 at 06:43 PM..
AndrewGSW is offline   Reply With Quote