#security #utility #terminal #tool #math

app luhncalc

Validate a digit sequence using Luhn algorithm and calculates the sequence’s next validation digit

1 stable release

1.0.1 Apr 28, 2021
1.0.0 Apr 18, 2021

#520 in #security

33 downloads per month

MIT/Apache

9KB

luhncalc

crates.io version build status downloads docs.rs docs

Luhn Calculator is a command-line utility to quickly validate a digit sequence using Luhn algorithm and calculate the next validation digit to be appended to the digit sequence to make whole sequence valid.

How to use

Validate the following invalid digit sequence 1234567890:

> luhncalc 1234567890

Sequence:       1234567890
Valid sequence: false
Next digit:     3

Validate the following valid digit sequence 12345678903:

> luhncalc 12345678903

Sequence:       12345678903
Valid sequence: true
Next digit:     1

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-20 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~2.5MB
~49K SLoC