package
module
Version:
v0.0.0-...-967f831
Opens a new window with list of versions in this module.
Published: Feb 18, 2021
License: Unlicense
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
zero-alloc verhoeff checksum algorithm
Usage
import "github.com/jancajthaml-go/verhoeff"
ok := verhoeff.Validate("00123014764700968325")
digit, error := verhoeff.Digit("x")
signed := verhoeff.Generate("1")
Resources
Documentation
¶
Digit returns verhoeff digit for given numeric string
Generate signs string with verhoeff digit
Validate returns true if numeric string is signed with valid luhn digit
Source Files
¶
Click to show internal directories.
Click to hide internal directories.