ASP常用函数收藏乱七八糟未整理版(32)
Dim bytLen(3)
Dim lPosition
If Not IsInitialized(bytIn) Then
Exit Function
End If
If Not IsInitialized(bytPassword) Then
Exit Function
End If
lEncodedLength = UBound(bytIn) + 1
If lEncodedLength Mod 32 <> 0 Then
Exit Function
End If
For lCount = 0 To UBound(bytPassword)
bytKey(lCount) = bytPassword(lCount)
If lCount = 31 Then
Exit For
End If
Next
gentables
gkey 8, 8, bytKey
ReDim bytOut(lEncodedLength - 1)
For lCount = 0 To lEncodedLength - 1 Step 32
CopyBytesASP bytTemp, 0, bytIn, lCount, 32
Decrypt bytTemp
CopyBytesASP bytOut, lCount, bytTemp, 0, 32
Next
lLength = Pack(bytOut)
If lLength > lEncodedLength - 4 Then
Exit Function
End If
ReDim bytMessage(lLength - 1)
CopyBytesASP bytMessage, 0, bytOut, 4, lLength
DecryptData = bytMessage
End Function
8.一个日期转换函数
Function FormatDate(byVal strDate, byVal strFormat)
' Accepts strDate as a valid date/time,
' strFormat as the output template.
' The function finds each item in the
' template and replaces it with the
' relevant information extracted from strDate.
' You are free to use this code provided the following line remains
内容版权声明:除非注明,否则皆为本站原创文章。