Page 1 of 1

Flashcode checksum value

Posted: Sun Sep 27, 2009 7:20 am
by wa6ylb
I've wondered if someone out there has figured out how the checksum digit is calculated in a flashcode.
I've looked at it a bit here, but haven't stumbled upon how its done.
Thank you.
B.

Re: Flashcode checksum value

Posted: Sun Sep 27, 2009 11:51 am
by Batwings21
I would ask Akardam, he has a wonderful flashcode decoder in his site and I would assume he knows how to calculate the flashcode checksum also.

Re: Flashcode checksum value

Posted: Sun Sep 27, 2009 7:47 pm
by escomm
I think all the characters have to add up to 9 or something

Re: Flashcode checksum value

Posted: Mon Sep 28, 2009 12:52 pm
by akardam
The flashcode checksum is calculated via a variation on the Luhn_algorithm.

If you're curious, I've got a script into which you can drop a flashcode and it will compute the checksum for you:

http://www.akardam.net/moto/tools/flashcode_checksum.pl

Edit: Actually, it would be more accurate to say it was based on a variation of the Luhn_mod_N_algorithm because of needing to map alpha-characters to numbers, and having a checksum digit which can be any number 0-9. It's still based on modulus 10 though.

Re: Flashcode checksum value

Posted: Mon Sep 28, 2009 1:03 pm
by Batwings21
Look, we ask how to do it, and he answers us AND makes a calculator for us. Too cool...

Re: Flashcode checksum value

Posted: Mon Sep 28, 2009 1:04 pm
by escomm
*rubs head*

I don't know what that all says but I'm pretty sure it's a little more complicated than just everything adding up to 9.