Vb.net CRC16 calculator

greenbug2002
greenbug2002 used Ask the Experts™
on
Hi I need a little help
I am trying to calculate crc-16 checksum in VB.net
I need to use polynomial 1021 with the input and result reflected,
initial value of 0 and final Xor value 0xFFFF
so if I input Bytes FF FF FF FF 00 0B 66 1A  a CRC of 2CFB is returned
I have found an online JavaScript tool at http://www.sunshine2k.de/coding/javascript/crc/crc_js.html but I need it in Vb.Net and have no idea how to convert the code

a simple textbox and Button vb.net app would be perfect
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Dr. KlahnPrincipal Software Engineer

Commented:
Which version of CRC-16 are you trying to calculate?  There are about a dozen and they are not interchangeable.

Author

Commented:
Hi Thanks for the Reply
its a CCITT Version
•Width = 16 bits
•Truncated polynomial = 0x1021
•Initial value = 0
•Input data is reflected
•Output CRC is reflected
• XOR 0xFFFF is performed on the output CRC
hope this helps
Dr. KlahnPrincipal Software Engineer
Commented:
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

Author

Commented:
Hi thanks I did look at that and had an extensive google around trying to figure it out for myself but the code used its a bit beyond me I am quite new to programing could you pull it into a working example?

Author

Commented:
Also looking at the code I don't think it has support for reflecting the input and output
Top Expert 2016
Commented:

Author

Commented:
Hi Thanks for the replay I did but its not capable of reflecting the input and output and I have no idea how to program it to
Dr. KlahnPrincipal Software Engineer

Commented:
Two correct references to available solutions provided.  No further input from requester.  Points assigned to contributors.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial