Just for fun, I tried something. It seems to work pretty well, and fast
too!
<cfset length = 8>
<cfset pswd = "">
<cfloop index="i" from="1" to="#length#" step="1">
<cfset donumbers = RandRange(0,1)>
<cfif donumbers>
<cfset lowend = 49>
<cfset highend = 57>
<cfelse>
<cfset uppercase = RandRange(0,1)>
<cfif uppercase>
<cfset lowend = 65>
<cfset highend = 90>
<cfelse>
<cfset lowend = 97>
<cfset highend = 122>
</cfif>
</cfif>
<cfset pswd = pswd & Chr(RandRange(lowend,highend))>
</cfloop>
--
Jamie Keane
Programmer
SolutionMasters, Inc.
9111 Monroe Rd., Suite 100
Charlotte, NC 28270
www.solutionmasters.com
704.563.5559 x 228 Voice
704.849.9291 Fax
-----Original Message-----
From: Stas Newdel <[EMAIL PROTECTED]>
To: CFTalk <[EMAIL PROTECTED]>
Date: Monday, August 28, 2000 5:06 PM
Subject: password generation code snippet needed
>Hello,
>
>Does anyone have code lying around that will generate an alpha-numeric
mixed
>case string? Thanks.
>
>---------------------------------------------------------------------------
---
>Archives: http://www.mail-archive.com/[email protected]/
>To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.