Public Shared Function ComputeCrc(ByVal data As Byte()) As UInt16 Dim crc As UShort = &HFFFF For Each datum As Byte In data crc = CUShort((crc >> 8) Xor CrcTable((crc Xor datum) And &HFF)) Next Return crc End Function
Dim myString As String = "assdfdfgsdfg" Dim retval As UInt16 = [MyClass].ComputeCrc(System.Text.Encoding.ASCII.GetBytes(myString))
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)