zblog asp版本 密码应该有两层MD5和Guid MD5(MD5(OriginaPassword) & Guid)
'*********************************************************
' 目的: 生成随机Guid
'*********************************************************
Function RndGuid()
Dim i,s
Const c="0123456789ABCDEF"
Randomize
For i=1 To 32
s=s & Mid(c,Int(Rnd*16)+1,1)
If i=1 And s="0" Then s="F"
If i=8 Then s=s & "-"
If i=12 Then s=s & "-"
If i=16 Then s=s & "-"
If i=20 Then s=s & "-"
Next
RndGuid=s
End Function
Private FGuid
Public Property Get Guid
If FGuid="" Then
FGuid=RndGuid()
If ID>0 Then
FGuid=objConn.Execute("SELECT [mem_Guid] FROM [blog_Member] WHERE [mem_ID]="&ID)(0)
End If
End If
Guid=FGuid
End Property
Public Function CreatePasswordByOriginal(OriginaPassword)
CreatePasswordByOriginal=MD5(MD5(OriginaPassword) & Guid)
End Function
Public Function GetPasswordByOriginal(OriginaPassword)
Dim objRS
Set objRS=objConn.Execute("SELECT [mem_Guid] FROM [blog_Member] WHERE [mem_Name]='"&Name & "'" )
If (Not objRS.Bof) And (Not objRS.Eof) Then
GetPasswordByOriginal=MD5(MD5(OriginaPassword) & objRS("mem_Guid"))
End If
objRS.Close
Set objRS=Nothing
End Function