Hi,
i have this function for Crc16 but i didn't find any slimier function for Crc32
thanks
B4X:
Sub Crc16(Txt As String) As String
Dim Crc As Int : Crc = 0xFFFF
Dim bytes() As Byte
bytes=Txt.GetBytes("UTF8")
For i = 0 To bytes.Length - 1
Crc = Bit.Xor(Bit.ShiftLeft(Crc, 8), CrcTable(Bit.Xor(Bit.AND(0xFF,Bit.ShiftRight(Crc, 8)), Bit.AND(0xFF,bytes(i)))))
Crc = Bit.AND(Crc, 0xFFFF)
Next
Return Bit.ToHexString(Crc).ToUpperCase
End Sub
i have this function for Crc16 but i didn't find any slimier function for Crc32
thanks