Tally List : mailing list management, archiving, and analysis
click for archive home
 
Archive of:
CF-Talk
Cold Fusion - Technical
 
home
24 hour view
quick stats
weekly updates
 
all tallylists
corporate solutions
archive your favorite
help / feedback


Search the Tallylist search by keyword:

About Cold Fusion :
product's home
product's list home
 
  Archived TallyList / CF-Talk: 
Subject: RE: Random Password
Peter Stolz (16p/+0r)     Posted: Thursday 03 May 2001
This post: 83 views, +0 rating

I wrote a custom tag that does this:

<CF_RANDOMSTRING LENGTH = "12" CHARSTART = "1" CHAREND = "z" OUTPUTVARIABLE="myString">

generates a pseudo random string of specified length containing only characters found between the ascii values of CHARSTART and CHAREND

<CFPARAM NAME="Attributes.Length" DEFAULT="12"> <CFPARAM NAME="Attributes.CharStart" DEFAULT="1"> <CFPARAM NAME="Attributes.CharEnd" DEFAULT="z"> <CFPARAM NAME="Attributes.OutputVar" DEFAULT="RandomString">

<CFSCRIPT> result = "";

for(i=1;i LT Attributes.Length;i=i+1){ result = result & Chr(RandRange(Asc(Attributes.CharStart),Asc(Attributes.CharEnd))); }

SetVariable("Caller.#Attributes.OutputVar#",result); </CFSCRIPT>

P.

-----Original Message----- From: Chris Martin [mailto:chrism@fsenablers.com] Sent: Thursday, May 03, 2001 5:38 PM To: CF-Talk Subject: RE: Random Password

Here's one I got off this list a while ago. Props to whoever wrote it, because its helped me out a few times.

<cfscript> random_word = Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1); random_word = random_word & Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1); random_word = random_word & Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1); random_word = random_word & Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1); random_word = random_word & Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1); random_word = random_word & Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1); random_word = random_word & Mid("ABCDEFGHIJKLMNOPQRSTUVWXYZ", RandRange(1,26), 1);

password = "#random_word##RandRange(1000,9999)#"; </cfscript>

<cfoutput>PASSWORD: <b>#password#</b></cfoutput>

it will generate a password with 7 random letter and a 4 digit number.

-----Original Message----- From: Chris Badouin [mailto:chris@theeverydaypeople.com] Sent: Thursday, May 03, 2001 12:24 PM To: CF-Talk Subject: Random Password

All-

Sorry I am pressed for time today, but does any one have script for generating random passwords?

CB


Similar Subject Line Posts (+/- two weeks of this post)
RE: Code Snippet:Random Password Generator(repost)  10 May 2001   (58 v/ +0 r)
RE: Code Snippet:Random Password Generator(repost)  10 May 2001   (111 v/ +0 r)
RE: Code Snippet:Random Password Generator(repost)  10 May 2001   (59 v/ +0 r)
RE: Code Snippet:Random Password Generator(repost)  07 May 2001   (60 v/ +0 r)
Code Snippet:Random Password Generator(repost)  04 May 2001   (60 v/ +0 r)
RE: Random Password  03 May 2001   (46 v/ +0 r)
Re: Random Password  03 May 2001   (57 v/ +0 r)
RE: Random Password  03 May 2001   (50 v/ +0 r)
RE: Random Password  03 May 2001 (this post)   (83 v/ +0 r)
RE: Random Password  03 May 2001   (49 v/ +0 r)
RE: Random Password  03 May 2001   (50 v/ +0 r)
RE: Random Password  03 May 2001   (44 v/ +0 r)
RE: Random Password  03 May 2001   (54 v/ +0 r)
Random Password  03 May 2001   (42 v/ +0 r)
 

Send a reply to the CF-Talk list!
click to send a reply! NOTE: Many lists will reject your post unless you have already registered with them. Also - don't forget the right account to send from (for those with multiple emails!)

Feedback: If this post was exceptionally helpful, please help by giving this post a positive review.

 

TallyList : copyright Ububik - 2000