#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

new 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

#414 in Text processing

Download history 489/week @ 2023-12-04 981/week @ 2023-12-11 1037/week @ 2023-12-18 147/week @ 2023-12-25 196/week @ 2024-01-01 322/week @ 2024-01-08 456/week @ 2024-01-15 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

4,275 downloads per month
Used in 13 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.5MB
~60K SLoC