#precis #profiles #user-name #password #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

12 releases

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

#24 in Internationalization (i18n)

Download history 4212/week @ 2024-11-29 3619/week @ 2024-12-06 3578/week @ 2024-12-13 1573/week @ 2024-12-20 1482/week @ 2024-12-27 2630/week @ 2025-01-03 2902/week @ 2025-01-10 2809/week @ 2025-01-17 2862/week @ 2025-01-24 3437/week @ 2025-01-31 3322/week @ 2025-02-07 3063/week @ 2025-02-14 3566/week @ 2025-02-21 3108/week @ 2025-02-28 3637/week @ 2025-03-07 3629/week @ 2025-03-14

14,440 downloads per month
Used in 49 crates (3 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

~1–2.4MB
~51K SLoC