lib/protocol: Add note about non-standard Luhn calculation (#4895)
Skip-check: authors
This commit is contained in:
@@ -17,6 +17,8 @@ var (
|
|||||||
|
|
||||||
// generate returns a check digit for the string s, which should be composed
|
// generate returns a check digit for the string s, which should be composed
|
||||||
// of characters from the Alphabet a.
|
// of characters from the Alphabet a.
|
||||||
|
// Doesn't follow the actual Luhn algorithm
|
||||||
|
// see https://forum.syncthing.net/t/v0-9-0-new-node-id-format/478/6 for more.
|
||||||
func (a luhnAlphabet) generate(s string) (rune, error) {
|
func (a luhnAlphabet) generate(s string) (rune, error) {
|
||||||
factor := 1
|
factor := 1
|
||||||
sum := 0
|
sum := 0
|
||||||
|
|||||||
Reference in New Issue
Block a user