/NimVerhoeff

An implementation of the Verhoeff algorithm in nim

Primary LanguageNim

What is the Verhoeff algorithm?

As the best source says, "The Verhoeff algorithm is a checksum formula for error detection developed by the Dutch mathematician Jacobus Verhoeff".


Usage

To generate the checksum of a number use:

checksum("12340")

To generate the check digit that would make the number valid use:

calc_check_digit("1234")

To check if a number is valid use:

is_valid("12340")

Changelog

  • 27-March-2019 Added core files.