The substitution digits, that is, the results of the double and reduce procedure, were not produced mechanically.
The algorithm appeared in a US Patent for a hand-held, mechanical device for computing the checksum. The device took the mod 10 sum by mechanical means.
We then make a small addition to the You can test this with your own credit card number or, if you're a less trusting individual, the sample next to the input box will also pass the test.
Or you can save the contents of this link to your computer and do the testing there: [Stand-alone example] If you don't want to clutter up your form with all those Java Script events then the same checks can be made in a Some programmers are dismissive of client-side validation as it can't be used as a replacement for server-side validation and therefore creates more code to maintain.
It was created by IBM scientist Hans Peter Luhn and described in U. The algorithm is in the public domain and is in wide use today. It is not intended to be a cryptographically secure hash function; 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.