#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

#166 in Text processing

Download history 1353/week @ 2024-04-03 1608/week @ 2024-04-10 1506/week @ 2024-04-17 1972/week @ 2024-04-24 1549/week @ 2024-05-01 1239/week @ 2024-05-08 2175/week @ 2024-05-15 1426/week @ 2024-05-22 1593/week @ 2024-05-29 1785/week @ 2024-06-05 1385/week @ 2024-06-12 1461/week @ 2024-06-19 1958/week @ 2024-06-26 2227/week @ 2024-07-03 1650/week @ 2024-07-10 1762/week @ 2024-07-17

7,864 downloads per month
Used in 18 crates (2 directly)

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.2MB
~58K SLoC