[1] http://www.tillett.info/2014/06/12/base32-implementation-of-...
Another potential use is for checking coupon codes client side. Of course a JavaScript port would be good for this.
>>> len("23456789abcdefghjkmnpqrstuvwxyz")
31
>>> (26 + 10) - 5 # a-z0-9, remove 1il0O
31Edit. I do agree that I should make this clearer since if someone uses less than 31 characters then they will run into problems if they don't update my code.
First there's the Luhn algorithm, which "will detect any single-digit error, as well as almost all transpositions of adjacent digits. It will not, however, detect transposition of the two-digit sequence 09 to 90 (or vice versa). It will detect 7 of the 10 possible twin errors (it will not detect 22 ↔ 55, 33 ↔ 66 or 44 ↔ 77)." [0]
Then came the Verhoeff algorithm, which "was the first decimal check digit algorithm which detects all single-digit errors, and all transposition errors involving two adjacent digits, which was at the time thought impossible with such a code." [1]
The Damm algorithm was developed in 2004 and was a further improvement:
> The Damm algorithm is similar to the Verhoeff algorithm. It too will detect all occurrences of the two most frequently appearing types of transcription errors,[1] namely altering one single digit, and transposing two adjacent digits (including the transposition of the trailing check digit itself and the digit preceding it). But the Damm algorithm has the benefit that it makes do without the dedicatedly constructed permutations and its position specific powers being inherent in the Verhoeff scheme. Furthermore, a table of inverses can be dispensed with provided all main diagonal entries of the operation table are zero.
> The Damm algorithm does not suffer from exceeding the number of 10 possible values, resulting in the need for using a non-digit character (as the X in the 10-digit ISBN check digit scheme).
> Prepending leading zeros does not affect the check digit.
> There are totally anti-symmetric quasigroups that detect all phonetic errors associated with the English language (13 ↔ 30, 14 ↔ 40, ..., 19 ↔ 90). The table used in the illustrating example is based on an instance of such kind.
> Despite its desirable properties in typical contexts where similar algorithms are used, the Damm algorithm is largely unknown and scarcely used in practice.
That last point is also why I submitted this :)