-
UID:2
-
- 注册时间2005-01-04
- 最后登录2024-07-30
- 在线时间128小时
-
- 发帖600
- 搜Ta的帖子
- 精华47
- PB3246
- 威望526
- 贡献值187
- 交易币124
- 好评度279
-
访问TA的空间加好友用道具
|
- <%
- Sub StrRandomize(strSeed)
- Dim i,nSeed
- nSeed = CLng(0)
- For i = 1 To Len(strSeed)
- nSeed = nSeed Xor ((256 * ((i - 1) Mod 4) * AscB(Mid(strSeed, i, 1))))
- Next
- Randomize nSeed
- End Sub
- Function GeneratePassword(nLength)
- Dim i, bMadeConsonant, c, nRnd
- Const strDoubleConsonants = "BDFGLMNPST"
- Const strConsonants = "BCDFGHKLMNPQRSTV"
- Const strVocal = "1234567890"
- GeneratePassword = ""
- bMadeConsonant = False
- For i = 0 To nLength
- nRnd = Rnd
- If GeneratePassword<>"" AND (bMadeConsonant<>True) AND (nRnd<0.15) Then
- Randomize
- c = Mid(strDoubleConsonants, Int(Len(strDoubleConsonants) * Rnd + 1), 1)
- c = c & c
- i = i + 1
- bMadeConsonant = True
- Else
- If (bMadeConsonant<True) And (nRnd<0.95) Then
- Randomize
- c = Mid(strConsonants, Int(Len(strConsonants) * Rnd + 1), 1)
- bMadeConsonant = True
- Else
- Randomize
- c = Mid(strVocal,Int(Len(strVocal) * Rnd + 1), 1)
- bMadeConsonant = False
- End If
- End If
- GeneratePassword = GeneratePassword & c
- Next
- If Len(GeneratePassword)>nLength Then
- GeneratePassword = Left(GeneratePassword, nLength)
- End If
- End Function
- '得到密码
- pwd=GeneratePassword(2)
- %>
|