To further the encryption of this code, try this:
<cfset random_word = "">
<cfset password = "">
<cfloop index="ii" from="1" to="4">
<cfset random_number = "#RandRange(1,26)#">
<cfset alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
<cfset random_letter = "#Mid(alphabet,random_number,1)#">
<cfset random_word = "#ListAppend(random_word,random_letter)#">
</cfloop>
<cfset random_word = "#Replace(random_word, ",", "", "ALL")#">
<cfset random_number = "#RandRange(1000,9999)#">
<CFLOOP INDEX="i" FROM="1" TO="#Len(random_word)#">
<CFSET password =
"#Password##Mid(random_word,i,1)##Mid(random_number,i,1)#">
</cfloop>
<cfoutput>PASSWORD: <b>#password#</b></cfoutput>
The code above will generate a 4 letter random word and a 4 letter random
number then entertwine them into an 8 character long password. Alternating
1 letter and one number to the end of the password.
-----Original Message-----
From: Peter Tilbrook [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 5:20 PM
To: '[EMAIL PROTECTED] '
Subject: RE: password generation code snippet needed
This script generates a random word 7 letters long plus 4 digits long.
Example code:
<cfset random_word = "">
<cfloop index="ii" from="1" to="7">
<cfset random_number = "#RandRange(1,26)#">
<cfset alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
<cfset random_letter = "#Mid(alphabet,random_number,1)#">
<cfset random_word = "#ListAppend(random_word,random_letter)#">
</cfloop>
<cfset random_word = "#Replace(random_word, ",", "", "ALL")#">
<cfset random_number = "#RandRange(1000,9999)#">
<cfset password = "#random_word##random_number#">
<cfoutput>PASSWORD: <b>#password#</b></cfoutput>
----------------------------------------------------------------------------
--
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.