#hash #context #hasher #traits #shared #rusty-shield

rs_hasher_ctx

rs_hasher_ctx is an internal crate of the RustyShield library. It provides the HasherContext trait used across various cryptographic hash function implementations within RustyShield. The trait overloads the Hasher::finish() function, unifying the approach to obtaining hash results. While primarily intended for use within RustyShield, rs_hasher_ctx can aid in minimizing dependency entries in external crates leveraging RustyShield’s hashing capabilities.

4 releases

0.1.3 Jun 12, 2023
0.1.2 Jun 4, 2023
0.1.1 Jun 4, 2023
0.1.0 May 30, 2023

#886 in Cryptography

Download history 166/week @ 2024-03-14 109/week @ 2024-03-21 129/week @ 2024-03-28 121/week @ 2024-04-04 263/week @ 2024-04-11 350/week @ 2024-04-18 247/week @ 2024-04-25 494/week @ 2024-05-02 149/week @ 2024-05-09 139/week @ 2024-05-16 184/week @ 2024-05-23 315/week @ 2024-05-30 358/week @ 2024-06-06 206/week @ 2024-06-13 376/week @ 2024-06-20 348/week @ 2024-06-27

1,326 downloads per month
Used in 20 crates (18 directly)

GPL-2.0-only

115KB
2.5K SLoC

rs_hasher_ctx

The rs_hasher_ctx crate provides the HasherContext trait, including a redefinition of Hasher::finish(). This crate is considered as an internal trait of rs_shield, and it is primarily intended to streamline the dependencies in the broader RustyShield project.

While rs_hasher_ctx can be used independently, its primary purpose is to offer a consistent and shared context for all cryptographic hash function crates in the RustyShield library. Each hash function that makes use of rs_hasher_ctx is able to export the HasherContext trait, which in turn minimizes the number of dependency declarations required in any given crate.

How To Use

Here are the steps to use the rs_hasher_ctx crate in your Rust projects:

  1. Add the following line to your Cargo.toml under the [dependencies] section:

    rs_hasher_ctx = "0.1.*"
    
  2. Use the HasherContext trait in your code as follows:

    use rs_hasher_ctx::HasherContext;
    

More Information

For a more detailed exploration of rs_hasher_ctx, an overview of other available cryptographic functions, and an introduction to the broader rs_shield project, please consult the RustyShield project page on crates.io.

Contributions

Potential contributors are encouraged to consult the contribution guidelines on our GitHub page.

License

This project is licensed under GPL-2.0-only.

Dependencies