Calculate and verify check digits