1 unstable release
Uses old Rust 2015
0.1.0 | Oct 13, 2018 |
---|
#38 in #digits
897 downloads per month
5KB
50 lines
damm
Implements the Damm algorithm. See the docs for more info.
lib.rs
:
This is a Rust implementation of the Damm algorithm. The algorithm is used for ID validation to catch common transposition errors.
This crate provides a simple and fast implementation
of the Damm algorithm using u128
as the type of the id.
The only downside to this approach is that the largest ID
that one can use is 340282366920938463463374607431768211455
,
which means that the largest number of digits that one can use
reliably is 38.
If for some reason this is a major issue for someone needing any more digits than that, open an issue at gitlab and I'll extend this library to provide a string representation for Really Long ID's™.
Dependencies
~11KB