Posted By

jlvallelonga on 03/19/09


Tagged

password generator vbscript


Versions (?)

Who likes this?

5 people have marked this snippet as a favorite

OPTICnerd
nelda751
benrudolph
asifrizvigmailcom
higrade


genPassword


 / Published in: ASP
 

pass in the length of the password to generate and out comes a random alphanumeric password

  1. function genPassword(length)
  2. Randomize
  3. do until len(newPass) = length
  4. code = Int((74 * Rnd) + 48)
  5. if not((code >= 58 and code <= 64) or (code >= 91 and code <= 96)) then
  6. newPass = newPass & chr(code)
  7. end if
  8. loop
  9. genPassword = newPass
  10. end function

Report this snippet  

You need to login to post a comment.