#identity #turkish #validation #citizenship #tckn

tck_no

Turkish Citizenship ID Validator and Generator Library for Rust

3 stable releases

1.0.2 Dec 14, 2021
1.0.1 Dec 13, 2021

#246 in Value formatting

Custom license

6KB
57 lines

tck_no

Turkish Citizenship ID Validator and Generator Library for Rust

Installation

With cargo add installed run:

$ cargo add tck_no

Generate TC Identity


use tck_no::tckn;

fn main() {
    let tc_identity = tckn::generate();
    println!("{}", tc_identity);
}

Validate TC Identity


use tck_no::tckn;

fn main() {
    let tc_identity = "38246970008";

    if tckn::validate(tc_identity) {
        println!("Valid!");
    } else {
        println!("Invalid!");
    }
}

Contributing

Want to join us? Look at some of these issues:

License

Licensed under either of MIT license

Dependencies

~310KB