Documentation ¶
Overview ¶
Package damm supports the computation of a decimal checksum. It uses a method proposed by H. Michael Damm in 2004. The checksum doesn't change for leading zeroes.
The function CheckDigit computes the check sum as string:
c, err := CheckDigit("12345678901")
The function Validate checks whether the appended check digit is correct.
ok := Validate("123456789018")
Information about the algorithm is available on Wikipedia.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDigit ¶
CheckDigit computes the check digit and returns it as string. The function argument must only contain decimal digits.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.