benkonrath/django-iban — pull request #32 by intgr (2014-12-01 07:02:25+00:00)
Title: Various checksum improvements

I found three things to quibble about in the checksum implementation, here is the PR.

Long story short, it always bothered me when people write checksum code in such "magic" fashion, comparing the end result with a constant. But in this case it's an actual bug: checksum values '00', '01' and '99' can never occur in valid IBAN numbers, but previously the value 'EE012200221111099080' for example was accepted.

3rd commit refactors the checksum out into a separate function, I found that useful when converting legacy Estonian account numbers to IBAN format. This builds on the changes made in the 1st commit.