diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,13 +1,13 @@ # Collection of checksum algorithms on Go +Pure Go implementations. + ## Luhn algorithm > The Luhn algorithm or Luhn formula, also known as the "modulus 10" or "mod 10" algorithm, named after its creator, IBM scientist Hans Peter Luhn, is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers, IMEI numbers, National Provider Identifier numbers in the United States, Canadian Social Insurance Numbers, Israel ID Numbers, Greek Social Security Numbers (ΑΜΚΑ), and survey codes appearing on McDonald's, Taco Bell, and Tractor Supply Co. receipts. [Wikipedia](https://en.wikipedia.org/wiki/Luhn_algorithm) -Simple implementation on pure Go. - ### Usage ```golang @@ -51,7 +51,7 @@ if err != nil { panic(err) } numberWithChecksum := numberWithoutChecksum + checksum -if err := verhoeff.Generate(numberWithChecksum); err != nil { +if err := verhoeff.Check(numberWithChecksum); err != nil { panic(err) } ``` |