摘要: [csharp]view plaincopyprint?usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Runtime.Serialization.Formatters.Binary;usingSystem.IO;namespacesmsForCsharp.CRC{//////消息CRC校验算法///publicclassCRC{publicstaticStringgetCrc16Code(StringcrcString){//转换成字节数组byte[]creBytes=HexString2Byt 阅读全文
posted @ 2014-02-25 13:57 armyfai 阅读(37452) 评论(0) 推荐(0) 编辑
摘要: private static ushort[] crctab = new ushort[256]{ 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50a5, 0x60c6, 0x70e7, 0x8108, 0x9129, 0xa14a, 0xb16b, 0xc18c, 0xd1ad, 0xe1ce, 0xf1ef, 0x1231, 0x0210, 0x3273, 0x2252, 0x52b5, 0x4294, 0x72f7, 0x62d6, 0x9339, 0x8318, 0xb37b, 0xa35a, 0xd3bd, 0xc39c, 0xf3ff... 阅读全文
posted @ 2014-02-25 10:22 armyfai 阅读(5422) 评论(2) 推荐(0) 编辑