Skip to content

implementation of the Verhoeff checksum algorithm in crystal lang

License

Notifications You must be signed in to change notification settings

spider-gazelle/verhoeff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

verhoeff

An implementation of the verhoeff algorithm for crystal lang

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      verhoeff:
        github: spider-gazelle/verhoeff
  2. Run shards install

Usage

require "verhoeff"

puts Verhoeff.generate_checksum(1234)  # => 0
puts Verhoeff.validate(12340)          # => true

puts Verhoeff.generate_checksum("1234")  # => 0
puts Verhoeff.validate("12340")          # => true

Contributors

About

implementation of the Verhoeff checksum algorithm in crystal lang

Resources

License

Stars

Watchers

Forks

Packages

No packages published