Search for a tool
Luhn (Number checksum)

Tools to check Luhn generated numbers. The Luhn algorithm (also called modulo 10 or mod 10) is a checksum formula for numbers/digits used with credit card or administrative numbers.

Results

Luhn (Number checksum) -

Tag(s) : Checksum,Algorithm,Arithmetics,Mathematics

dCode and you

dCode is free and its tools are a valuable help in games, puzzles and problems to solve every day!
You have a problem, an idea for a project, a specific need and dCode can not (yet) help you? You need custom development? Contact-me!


Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Luhn (Number checksum) tool. Thank you.

This page is using the new English version of dCode, please make comments !

Luhn (Number checksum)

Sponsored ads

This script has been updated, please report any problems.

Numbers generated by Luhn Algorithm



Also on dCode: Luhn (Number checksum)

Tools to check Luhn generated numbers. The Luhn algorithm (also called modulo 10 or mod 10) is a checksum formula for numbers/digits used with credit card or administrative numbers.

Answers to Questions

What is the Luhn Algorithm for?

This algorithm allows checking credit card numbers MasterCard/AMEX/Visa of IMEI codes for example by using a control key checksum. If one character is badly written, in the Luhn algorithm can detect it.

Let 12345674 be a valid card number, 1234567 is the main original number and 4 is the checksum.

If a user enter 13245674, then the program calculates the checksum for 1324567 and finds 5 instead of 4 expected, the number is invalid and so has been badly typed.

How to verify a number with Luhn? (Validity check)

The algorithm starts by the end of the number, from the last right digit to the first left digit. One realizes a sum of digitshref by multiplying by 2 all digits of even rank. If the double is equal or superior to 10, one replaces it by the sum of its digitshref. The control digit number is equal to (10-sum%10) % 10.

Let the number be 853X, with X=0, the digit we want to calculate.

One takes the digit 3, doubled, 3*2 = 6,

One takes the digits 5, not multiplied by 2href

And one takes the 8, multiplies it by 2 : 8*2=16 and 1+6=7 to get 7.

The sum is 6+5+7 = 18. As 18 modulo 10href = 8, one calculated (10 - 8) %10 = 2, 2 is the digit checksum control.

So 8532 is valid.

Ask a new question

Source code

dCode retains ownership of the source code of the script Luhn (Number checksum). Except explicit open source licence (free / freeware), any algorithm, applet, software (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, translator), or any snippet or function (convert, solve, decrypt, encrypt, decipher, cipher, decode, code, translate) written in PHP (or Java, C#, Python, Javascript, etc.) which dCode owns rights can be transferred after sales quote. So if you need to download the Luhn (Number checksum) script for offline use, for you, your company or association, see you on contact page !

Questions / Comments


Team dCode read all messages and answer them if you leave an email (not published). It is thanks to you that dCode has the best Luhn (Number checksum) tool. Thank you.


Source : http://www.dcode.fr/luhn-algorithm
© 2016 dCode — The ultimate 'toolkit' website to solve every problem. dCode