CRC32 implementation on .NET Micro

前端 未结 3 732
误落风尘
误落风尘 2021-01-26 02:38

I was looking for a CRC32 implementation I could use on the .Net Micro framework. I found this implementation, but the micro framework has not yet implemented the HashAlgorithm.

3条回答
  •  醉酒成梦
    2021-01-26 03:04

    Try the CRC implementation from http://vbcity.com/cfs-file.ashx/__key/CommunityServer.Components.PostAttachments/00.00.47.04.55/CRC_5F00_Lib.zip . This is an implementation discussed at http://vbcity.com/forums/t/111345.aspx.

    You can verify the correctness of your CRC calculations at http://www.lammertbies.nl/comm/info/crc-calculation.html.

    The above mentioned link from vbcity discussion actually implements conversion of a c++ library given by http://www.lammertbies.nl/comm/info/crc-calculation.html.

    I found this to work correctly for my CRC 16 implementation.

    A short code snippet is

            ushort crcno = CRC.CRC16(stryourdata);
            Byte[] crcbytes = BitConverter.GetBytes(crcno);
    

提交回复
热议问题