当前位置:编程学习 > asp >>

一个生成随机密码的函数

tmp = "0123456789abcdefghijklmnopqrstopwxyz"
tmpPWD = RoundStr(tmp,8)
Function RoundStr(str,Num)
s = ""
for i = 1 to Num
Randomize
strLen = Len(str)
t = Round((RND * (strLen-1))+1)
s = s & mid(str,t,1)
Next
RoundStr = s
End Function

补充:asp教程,安全加密
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,