编程语言

img iwebsms

返回8位小写字母数字混合随机密码

发表于2004/9/28 19:42:00  1245人阅读

'返回8位小写字母数字混合随机密码

Function GetRandomPassword() As String

    Dim s As String() = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}

    Dim r As New Random

    Return s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString() & s(r.Next(0, s.Length)).ToString()

End Function

阅读全文
0 0

相关文章推荐

img
取 消
img