PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings in Application Protocols as described in rfc8264
This crate implements the next PRECIS profiles: * rfc8265. Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords. * rfc8266. Preparation, Enforcement, and Comparison of Internationalized Strings Representing Nicknames
```rust extern crate precis_profiles;
use preciscore::profile::PrecisFastInvocation; use precisprofiles::Nickname; use std::borrow::Cow;
fn main() { asserteq!(Nickname::prepare("Guybrush Threepwood"), Ok(Cow::from("Guybrush Threepwood"))); asserteq!(Nickname::enforce(" Guybrush Threepwood "), Ok(Cow::from("Guybrush Threepwood"))); assert_eq!(Nickname::compare("Guybrush Threepwood ", "guybrush threepwood"), Ok(true)); } ```
You can use this package in your project by adding the following
to your Cargo.toml
:
toml
[dependencies]
precis-profiles = "0.1.3"
https://docs.rs/precis-profiles
This project is licensed under either of * Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0) * MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT) at your option.