首页 > 学院 > 开发设计 > 正文

ASP生成指定位数的随机密码

2019-11-17 04:13:00
字体:
来源:转载
供稿:网友

程序代码
<%
function genPassWord(length)
    Randomize
    do until len(newPass) = length
        code = Int((74 * Rnd) + 48)
        if not((code >= 58 and code <= 64) or (code >= 91 and code <= 96)) then
            newPass = newPass & chr(code)
        end if
    loop
    genPassword = newPass
end function

response.write genpassword(512)
%>


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表