#profiles #precis #user-name #rfc8265 #rfc8266 #rfc8264

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

11 releases

0.1.10 Mar 26, 2024
0.1.9 Oct 5, 2023
0.1.8 Oct 14, 2022
0.1.7 Jul 22, 2022
0.1.3 Nov 20, 2021

#168 in Text processing

Download history 818/week @ 2024-01-22 833/week @ 2024-01-29 925/week @ 2024-02-05 806/week @ 2024-02-12 613/week @ 2024-02-19 973/week @ 2024-02-26 1064/week @ 2024-03-04 1168/week @ 2024-03-11 1043/week @ 2024-03-18 1380/week @ 2024-03-25 1170/week @ 2024-04-01 1396/week @ 2024-04-08 1791/week @ 2024-04-15 1734/week @ 2024-04-22 1756/week @ 2024-04-29 1137/week @ 2024-05-06

6,457 downloads per month
Used in 16 crates (via 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:

Bitcoin QR Code Ethereum QR Code

License

This project is licensed under either of

say thanks

Dependencies

~0.6–2.6MB
~60K SLoC