I realize this is from last week, but I'm just catching up on the list and see that one solution wasn't offered that may be useful.
 
You may want to check out the RandString UDF by Joshua Miller available in the cflib.org site at http://www.cflib.org/udf.cfm?ID=171. It has a type attribute of alpha or numeric, or if neither is offered, it makes a random string of alternating alpha and numeric characters. That would at least guarantee at least 1 number, assuming the length argument is at least 2 or greater. :-)
 
Even if you're not running CF5 and can't use the UDF itself, you can still view the code used in the function and see its very simple approach. Click the "view this udf" link on the page above.
 
/charlie
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Mark J. Handy
Sent: Friday, March 22, 2002 10:38 AM
To: CFTALK
Subject: [CFTALKTor] password generation

I�m creating a small util for generating a password, which is working fine. What I�m have trouble doing is checking that the generated password contains at least one number. I�m looking for an quick way to check, rather than checking each character, which could be a problem.

 

Mark

Reply via email to