Password Generator Example In ASP
Asp / / July 04, 2021
If you are making an application where it is necessary to generate a password, this piece of code in ASP will be very useful.
Copy the following code and save it with the name GeneratorPassword.asp
'Example of password generator in ASP
Function gen_con (max_num)
dim gen_array (36)
'Array of characters
gen_array (0) = "0"
gen_array (1) = "1"
gen_array (2) = "2"
gen_array (3) = "3"
gen_array (4) = "4"
gen_array (5) = "5"
gen_array (6) = "6"
gen_array (7) = "7"
gen_array (8) = "8"
gen_array (9) = "9"
gen_array (10) = "a"
gen_array (11) = "b"
gen_array (12) = "c"
gen_array (13) = "d"
gen_array (14) = "e"
gen_array (15) = "f"
gen_array (16) = "g"
gen_array (17) = "h"
gen_array (18) = "i"
gen_array (19) = "j"
gen_array (20) = "k"
gen_array (21) = "l"
gen_array (22) = "m"
gen_array (23) = "n"
gen_array (24) = "o"
gen_array (25) = "p"
gen_array (26) = "q"
gen_array (27) = "r"
gen_array (28) = "s"
gen_array (29) = "t"
gen_array (30) = "u"
gen_array (31) = "v"
gen_array (32) = "w"
gen_array (33) = "x"
gen_array (34) = "y"
gen_array (35) = "z"
Randomize
'Generate the chain until the length is reached
do while len (output)
output = output + num
loop
'The function returns a result = output
gen_con = output
End Function
'Output function that takes the maximum value
If Request. Form ("NUMGEN") <> "" THEN
intGEN = CInt (Request. Form ("NUMGEN"))
a = 0
do while a <500
response.write gen_con (intGEN) & "
"
a = a + 1
loop
end if
%>
o = letter "o"
O = capital letter "O"
0 = zero
l = letter "l"
1 = number 1