#precis #profiles #rfc8264 #rfc8265 #rfc8266

precis-profiles

Implementation of the PRECIS Framework: Preparation, Enforcement, and Comparison of Internationalized Strings Representing Usernames and Passwords as defined in rfc8265; and Nicknames as defined in rfc8266

9 releases

0.1.8 Oct 14, 2022
0.1.7 Jul 22, 2022
0.1.4 Dec 4, 2021
0.1.3 Nov 20, 2021

#237 in Text processing

Download history 4/week @ 2022-11-29 18/week @ 2022-12-06 25/week @ 2022-12-13 7/week @ 2022-12-20 6/week @ 2022-12-27 4/week @ 2023-01-03 14/week @ 2023-01-10 12/week @ 2023-01-17 12/week @ 2023-01-24 23/week @ 2023-01-31 50/week @ 2023-02-07 31/week @ 2023-02-14 34/week @ 2023-02-21 151/week @ 2023-02-28 134/week @ 2023-03-07 267/week @ 2023-03-14

588 downloads per month
Used in stun-rs

MIT/Apache

750KB
2.5K SLoC

Docs Crates.io

precis-profiles

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

Examples

assert_eq!(Nickname::prepare("Guybrush Threepwood"),
  Ok(Cow::from("Guybrush Threepwood")));
assert_eq!(Nickname::enforce("   Guybrush     Threepwood  "),
  Ok(Cow::from("Guybrush Threepwood")));
assert_eq!(Nickname::compare("Guybrush   Threepwood  ",
  "guybrush threepwood"), Ok(true));

Contributing

Patches and feedback are welcome.

Donations

If you find this project helpful, you may consider making a donation:

Donate with Bitcoin Donate with Ethereum

License

This project is licensed under either of

say thanks

Dependencies