#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

#167 in Text processing

Download history 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 2000/week @ 2024-05-13 1970/week @ 2024-05-20 1161/week @ 2024-05-27 2251/week @ 2024-06-03 884/week @ 2024-06-10

6,548 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
~59K SLoC