Sign in to follow this  
Followers 0
fett8802

Fletcher Checksum

5 posts in this topic

#1 ·  Posted (edited)

At the moment, I've been assigned a task at my job to create a small program that will basically spam our proprietary strings over a TCP connection to a controlling software program. Everything is all good, except that the hardware that normally creates these strings also sends a 4 digit checksum at the beginning of each string. Our engineers told me it is a "Fletcher's Checksum" and I have scoured the internet and these forums for any sort of help duplicating this checksum in AutoIt. I know that I'll have no problem once I know the algorithm and can simply code it in AutoIt.

However, I can't find a single place online that just goes through the steps of a Fletcher Checksum. The wikipedia page on it has code written in C that performs the checksum, but I don't know C and am having trouble trying to translate it. I would be extremely grateful if anyone who knew C would mind translating it for me? You don't even have to write the AutoIt Code for me, just explain in plain English what the steps of the algorithm are and I'll write it.

Thanks so much for your help!

http://en.wikipedia.org/wiki/Fletcher%27s_checksum

-Fett

Edited by fett8802

[sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

A language independant specification of fletchers checksum can be found here: http://tools.ietf.org/html/rfc1146

It makes a difference between 16 bit and 8 bit checksum. I guess you will have to find out which of the two is used based on some examples.

Edited by Manadar

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

I actually read that article before posting my original post, haha! My problem also is that I don't understand all of that technical jargon, and I couldn't find anywhere that just went step by step through the process (except for the examples in C, which I don't understand either) I was kind hoping someone could say:

Beginning String: "Hello, I am your string!"

Step 1) Blah blah blah

Step 2) Blah blah blah

Step N) Here's our data checksum: 8429

P.S. For reference, it is an 8-Bit checksum

Edited by fett8802

[sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub]

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Found a visual basic implementation on the net. Might be easier to translate to AutoIt.

And here is an hash calculator so you can verify your implementation.

Or search the internet for a command line based hash calculator (like ReHash)

Edited by water

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Thanks guys! I appreciate your help.


[sub]My UDF[/sub][sub] - Basics and Time extensions. Great for those new at AutoIt, also contains some powerful time extensions for pros.[/sub][sub]ScrabbleIt[/sub][sub] - Scrabble done in pure AutoIt. (In Progress)[/sub][sub]Nerd Party Extreme | My Portfolio | [email="fett8802@gmail.com"]Contact Me[/email][/sub]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0