An implementation of the verhoeff algorithm for crystal lang
-
Add the dependency to your
shard.yml
:dependencies: verhoeff: github: spider-gazelle/verhoeff
-
Run
shards install
require "verhoeff"
puts Verhoeff.generate_checksum(1234) # => 0
puts Verhoeff.validate(12340) # => true
puts Verhoeff.generate_checksum("1234") # => 0
puts Verhoeff.validate("12340") # => true
- Stephen von Takach - creator and maintainer