you could use the RandRange function which will return a random integer
between 2 specified integers
example:
cfset RandomPass = RandRange("1","99,999,999") - NOTE: number must me less
than 100,000,000
-chris.alvarado
[developer] - VerticalNet
-Original Message-
From: Andrew@home
Does any one of you CF experts out there (as I am a real newbie)
know how to create a random password string, for 8 characters?
Is there a tag out there to use? Is there a simple, known, CFRANDOM
function or something? I would imagine this has been done before.
Yep. Go to
try this:
cfset chrACIIList =
"48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,
80,81,82,83,84,85,86,87,88,89,90"
cfset chrPwd = ""
cfloop from="1" to="8" index="thisCharacter"
cfset chrPwd = chrPwd Chr(ListGetAt(chrACIIList, RandRange(1,
Try the tag gallery on Allaire's site:
http://devex.allaire.com/developer/gallery/SearchResults.cfm?keywords=random
+password
Chris Montgomery [EMAIL PROTECTED]
Web Development Consulting http://www.astutia.com
Allaire Consulting Partner
210-490-3249/888-745-7603Fax
Does any one of you CF experts out there (as I am a real newbie)
know how to create a random password string, for 8 characters?
Is there a tag out there to use? Is there a simple, known, CFRANDOM
function or something? I would imagine this has been done before.
I threw this together. It's
Thanks Guys!
That was a big help.
Andrew
~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe:
6 matches
Mail list logo