|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
使用cdonts,可以发送、查看邮件,实现webmail的功能。结合wsh,可以实现对nt主机的管理,如nt用户管理、iis虚拟主机设置、exchange邮箱设置等等,就像管理本地机一样方便。加密|算法我想用户暗码有加密才是平安的(绝对),不是吗?
上面是md5加密算法!
<%
PrivateConstBITS_TO_A_BYTE=8
PrivateConstBYTES_TO_A_WORD=4
PrivateConstBITS_TO_A_WORD=32
Privatem_lOnBits(30)
Privatem_l2Power(30)
PrivateFunctionLShift(lValue,iShiftBits)
IfiShiftBits=0Then
LShift=lValue
ExitFunction
ElseIfiShiftBits=31Then
IflValueAnd1Then
LShift=&H80000000
Else
LShift=0
EndIf
ExitFunction
ElseIfiShiftBits<0OriShiftBits>31Then
Err.Raise6
EndIf
If(lValueAndm_l2Power(31-iShiftBits))Then
LShift=((lValueAndm_lOnBits(31-(iShiftBits+1)))*m_l2Power(iShiftBits))Or&H80000000
Else
LShift=((lValueAndm_lOnBits(31-iShiftBits))*m_l2Power(iShiftBits))
EndIf
EndFunction
PrivateFunctionRShift(lValue,iShiftBits)
IfiShiftBits=0Then
RShift=lValue
ExitFunction
ElseIfiShiftBits=31Then
IflValueAnd&H80000000Then
RShift=1
Else
RShift=0
EndIf
ExitFunction
ElseIfiShiftBits<0OriShiftBits>31Then
Err.Raise6
EndIf
RShift=(lValueAnd&H7FFFFFFE)m_l2Power(iShiftBits)
If(lValueAnd&H80000000)Then
RShift=(RShiftOr(&H40000000m_l2Power(iShiftBits-1)))
EndIf
EndFunction
PrivateFunctionRotateLeft(lValue,iShiftBits)
RotateLeft=LShift(lValue,iShiftBits)OrRShift(lValue,(32-iShiftBits))
EndFunction
PrivateFunctionAddUnsigned(lX,lY)
DimlX4
DimlY4
DimlX8
DimlY8
DimlResult
lX8=lXAnd&H80000000
lY8=lYAnd&H80000000
lX4=lXAnd&H40000000
lY4=lYAnd&H40000000
lResult=(lXAnd&H3FFFFFFF)+(lYAnd&H3FFFFFFF)
IflX4AndlY4Then
lResult=lResultXor&H80000000XorlX8XorlY8
ElseIflX4OrlY4Then
IflResultAnd&H40000000Then
lResult=lResultXor&HC0000000XorlX8XorlY8
Else
lResult=lResultXor&H40000000XorlX8XorlY8
EndIf
Else
lResult=lResultXorlX8XorlY8
EndIf
AddUnsigned=lResult
EndFunction
PrivateFunctionmd5_F(x,y,z)
md5_F=(xAndy)Or((Notx)Andz)
EndFunction
PrivateFunctionmd5_G(x,y,z)
md5_G=(xAndz)Or(yAnd(Notz))
EndFunction
PrivateFunctionmd5_H(x,y,z)
md5_H=(xXoryXorz)
EndFunction
PrivateFunctionmd5_I(x,y,z)
md5_I=(yXor(xOr(Notz)))
EndFunction
PrivateSubmd5_FF(a,b,c,d,x,s,ac)
a=AddUnsigned(a,AddUnsigned(AddUnsigned(md5_F(b,c,d),x),ac))
a=RotateLeft(a,s)
a=AddUnsigned(a,b)
EndSub
PrivateSubmd5_GG(a,b,c,d,x,s,ac)
a=AddUnsigned(a,AddUnsigned(AddUnsigned(md5_G(b,c,d),x),ac))
a=RotateLeft(a,s)
a=AddUnsigned(a,b)
EndSub
PrivateSubmd5_HH(a,b,c,d,x,s,ac)
a=AddUnsigned(a,AddUnsigned(AddUnsigned(md5_H(b,c,d),x),ac))
a=RotateLeft(a,s)
a=AddUnsigned(a,b)
EndSub
PrivateSubmd5_II(a,b,c,d,x,s,ac)
a=AddUnsigned(a,AddUnsigned(AddUnsigned(md5_I(b,c,d),x),ac))
a=RotateLeft(a,s)
a=AddUnsigned(a,b)
EndSub
PrivateFunctionConvertToWordArray(sMessage)
DimlMessageLength
DimlNumberOfWords
DimlWordArray()
DimlBytePosition
DimlByteCount
DimlWordCount
ConstMODULUS_BITS=512
ConstCONGRUENT_BITS=448
lMessageLength=Len(sMessage)
lNumberOfWords=(((lMessageLength+((MODULUS_BITS-CONGRUENT_BITS)BITS_TO_A_BYTE))(MODULUS_BITSBITS_TO_A_BYTE))+1)*(MODULUS_BITSBITS_TO_A_WORD)
ReDimlWordArray(lNumberOfWords-1)
lBytePosition=0
lByteCount=0
DoUntillByteCount>=lMessageLength
lWordCount=lByteCountBYTES_TO_A_WORD
lBytePosition=(lByteCountModBYTES_TO_A_WORD)*BITS_TO_A_BYTE
lWordArray(lWordCount)=lWordArray(lWordCount)OrLShift(Asc(Mid(sMessage,lByteCount+1,1)),lBytePosition)
lByteCount=lByteCount+1
Loop
lWordCount=lByteCountBYTES_TO_A_WORD
lBytePosition=(lByteCountModBYTES_TO_A_WORD)*BITS_TO_A_BYTE
lWordArray(lWordCount)=lWordArray(lWordCount)OrLShift(&H80,lBytePosition)
lWordArray(lNumberOfWords-2)=LShift(lMessageLength,3</p>由于ASP还是一种Script语言所没除了大量使用组件外,没有办法提高其工作效率。它必须面对即时编绎的时间考验,同时我们还不知其背后的组件会是一个什么样的状况; |
|