Internal utilities for CNH (Carteira Nacional de Habilitação) validation.
Internal utilities for CNH (Carteira Nacional de Habilitação) validation.
(calculate-dv1 base9)Calculates DV1 for the first 9 digits of a CNH. Returns map {:dv dv1 :penalize? true|false} where penalize? is true when the raw remainder was 10 (DV1 becomes 0).
Calculates DV1 for the first 9 digits of a CNH.
Returns map {:dv dv1 :penalize? true|false} where penalize? is true when
the raw remainder was 10 (DV1 becomes 0).(calculate-dv2 base9 dv1 penalize?)Calculates DV2 for a CNH given base digits, DV1, and penalty flag.
Calculates DV2 for a CNH given base digits, DV1, and penalty flag.
(valid-check-digits? cnh)Validates CNH check digits for a cleaned 11-digit string.
Validates CNH check digits for a cleaned 11-digit string.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |