PreviousNext
Adding Check Character
Help > IQRF Code Encoding > Adding Check Character

In this step, a check character is added at the end of the text to validate it and to protect it against accidental errors. The check character is computed using the Luhn mod N algorithm (see https://en.wikipedia.org/wiki/Luhn_mod_N_algorithm).

 

Example: Lod72

 

character index

character

base57 value

factor

addend

sum digits

sum

4

2

1

2

2

2

2

3

7

6

1

6

6

8

2

d

36

2

72

16

24

1

o

46

1

46

46

70

0

L

19

2

38

38

108

 

sum = 108

Check character value = ( 57 - ( 108 mod 57 ) ) mod 57 = 6

Check character = 7

 

Result = Lod727