Let’s understand the algorithm with an example:Ĭonsider the example of an account number “79927398713“. It was designed to protect against accidental errors, not malicious attacks. Most credit cards and many government identification numbers use the algorithm as a simple method of distinguishing valid numbers from mistyped or otherwise incorrect numbers. Because the algorithm is in the public domain, it can be used by anyone.
Shortly thereafter, credit card companies adopted it. The LUHN formula was created in the late 1960s by a group of mathematicians.
The Luhn algorithm, also known as the modulus 10 or mod 10 algorithm, is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, Canadian Social Insurance Numbers. There's two method actually to use the luhn algorithm. Thats why i make this, though it will be useful someday. Ccgen use luhn or modulus 10 algorithm to generate a valid credit card number.Ĭonsider of luhn algorithm is really affect on our life, cause a lot of nation or company has been used the algorithm for validate their product numbers like credit card numbers, id numbers, sim numbers and other.