HETU validator and generator in Rust
Simple crate for validating and generating Finnish Personal Identity Code (HETU).
Supports the 1.1.2023 format.
Works with rust 1.8 stable.
Usage
Add this to your Cargo.toml
[]
= "https://github.com/jelovirt/hetu.git"
To validate:
extern crate hetu;
use Ssn;
To generate:
extern crate hetu;
use Ssn;
To generate by pattern:
extern crate hetu;
use Ssn;
use SsnPattern;
CLI
Command line tool hetu
can be used to either validate or randomly generate
identifiers.
To validate:
|
To generate:
To generate by pattern that can contain wildcards: