Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Function CRC32(Data As String) As UInt32
- Dim ret As UInt32 = &HFFFFFFFF
- Dim i, j As Integer
- Dim CRC32Table As MemoryBlock = InitCRC32()
- For i = 1 To LenB(Data)
- j = AscB(MidB(Data, i, 1)) Xor (ret And &HFF)
- If ret < 0 Then ret = ((ret And &H7FFFFFFF) \ &H100) Or &H800000 Else ret = ret \ &H100
- ret = ret Xor CRC32Table.Int32Value(j * 4)
- Next
- ret = Not ret
- Return ret
- End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement