#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

#28 in Internationalization (i18n)

Download history 3228/week @ 2024-08-03 3671/week @ 2024-08-10 2198/week @ 2024-08-17 2215/week @ 2024-08-24 2385/week @ 2024-08-31 1794/week @ 2024-09-07 1789/week @ 2024-09-14 1429/week @ 2024-09-21 2289/week @ 2024-09-28 1776/week @ 2024-10-05 2025/week @ 2024-10-12 2628/week @ 2024-10-19 2574/week @ 2024-10-26 3621/week @ 2024-11-02 2710/week @ 2024-11-09 2585/week @ 2024-11-16

11,821 downloads per month
Used in 26 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.9–2.4MB
~50K SLoC