> Anyone got a password creator custom tag/UDF anywhere?
Here's one I found lying around the place, not saying it's the best but
it does the job.
Tim.
/**
* Generates a password the length you specify.
*
* @param numberOfCharacters Lengh for the generated password.
* @return Returns a string.
* @author Tony Blackmon ([EMAIL PROTECTED])
* @version 1, April 25, 2002
*/
function generatePassword(numberofCharacters) {
var placeCharacter = "";
var currentPlace=0;
var group=0;
var subGroup=0;
for(currentPlace=1; currentPlace lte numberofCharacters; currentPlace
= currentPlace+1) {
group = randRange(1,4);
switch(group) {
case "1":
subGroup = rand();
switch(subGroup) {
case "0":
placeCharacter = placeCharacter & chr(randRange(33,46));
break;
case "1":
placeCharacter = placeCharacter & chr(randRange(58,64));
break;
}
case "2":
placeCharacter = placeCharacter & chr(randRange(97,122));
break;
case "3":
placeCharacter = placeCharacter & chr(randRange(65,90));
break;
case "4":
placeCharacter = placeCharacter & chr(randRange(48,57));
break;
}
}
return placeCharacter;
}
-------------------------------------------------------
OUR NEW SITE IS NOW LIVE
Visit our new website at http://www.rawnet.com/ and
race around the beautiful Bracknell streets at
http://xmas.rawnet.com/
-------------------------------------------------------
Tim Blair
Web Application Engineer, Rawnet Limited
Direct Phone : +44 (0) 1344 393 441
Switchboard : +44 (0) 1344 393 040
-------------------------------------------------------
This message may contain information which is legally
privileged and/or confidential. If you are not the
intended recipient, you are hereby notified that any
unauthorised disclosure, copying, distribution or use
of this information is strictly prohibited. Such
notification notwithstanding, any comments, opinions,
information or conclusions expressed in this message
are those of the originator, not of rawnet limited,
unless otherwise explicitly and independently indicated
by an authorised representative of rawnet limited.
-------------------------------------------------------
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]