Jump to content

Fletcher Checksum


fett8802
 Share

Recommended Posts

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]
Link to comment
Share on other sites

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]
Link to comment
Share on other sites

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 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...