ASP常用函数收藏乱七八糟未整理版(23)
End Function
Private Function Pack(b())
Dim lCount
Dim lTemp
For lCount = 0 To 3
lTemp = b(lCount)
Pack = Pack or LShift(lTemp, (lCount * 8))
Next
End Function
Private Function PackFrom(b(), k)
Dim lCount
Dim lTemp
For lCount = 0 To 3
lTemp = b(lCount + k)
PackFrom = PackFrom or LShift(lTemp, (lCount * 8))
Next
End Function
Private Sub Unpack(a, b())
b(0) = a And m_lOnBits(7)
b(1) = RShift(a, 8) And m_lOnBits(7)
b(2) = RShift(a, 16) And m_lOnBits(7)
b(3) = RShift(a, 24) And m_lOnBits(7)
End Sub
Private Sub UnpackFrom(a, b(), k)
b(0 + k) = a And m_lOnBits(7)
b(1 + k) = RShift(a, 8) And m_lOnBits(7)
b(2 + k) = RShift(a, 16) And m_lOnBits(7)
b(3 + k) = RShift(a, 24) And m_lOnBits(7)
End Sub
Private Function xtime(a)
Dim b
If (a And &H80) Then
b = &H1B
Else
b = 0
End If
xtime = LShiftByte(a, 1)
xtime = xtime Xor b
End Function
Private Function bmul(x, y)
If x <> 0 And y <> 0 Then
bmul = m_ptab((CLng(m_ltab(x)) + CLng(m_ltab(y))) Mod 255)
Else
bmul = 0
End If
End Function
Private Function SubByte(a)
Dim b(3)
Unpack a, b
b(0) = m_fbsub(b(0))
内容版权声明:除非注明,否则皆为本站原创文章。