#crypto #hash #digest

crypto-hash

A wrapper for OS-level cryptographic hash functions

5 unstable releases

0.3.1 Mar 5, 2018
0.3.0 Jun 18, 2017
0.2.1 Dec 25, 2016
0.2.0 Nov 7, 2016
0.1.0 Jun 27, 2016

#6 in Cryptography

Download history 6438/week @ 2018-06-13 6564/week @ 2018-06-20 8372/week @ 2018-06-27 9235/week @ 2018-07-04 8490/week @ 2018-07-11 9518/week @ 2018-07-18 9782/week @ 2018-07-25 10165/week @ 2018-08-01 10056/week @ 2018-08-08 9815/week @ 2018-08-15 9346/week @ 2018-08-22 9475/week @ 2018-08-29 6634/week @ 2018-09-05

31,187 downloads per month
Used in 22 crates (2 directly)

MIT license

22KB
256 lines

crypto-hash

Linux/OS X Status Windows status Crates.io

crypto-hash is a Rust wrapper around OS-level implementations of cryptographic hash functions.

The purpose of this crate is to provide access to hash algorithms with as few dependencies as possible. This means that when possible, the library uses the hashing functions that are provided by the given operating system's bundled cryptographic libraries.

Supported Implementations

By operating system:

Supported Algorithms

  • MD5
  • SHA1
  • SHA256
  • SHA512

Usage

Add crypto-hash to your project's Cargo.toml. For more details, consult the Cargo guide.

Example:

use crypto_hash::{Algorithm, hex_digest};

let digest = hex_digest(Algorithm::SHA256, b"crypto-hash");

For more examples, consult the documentation.

Release Notes

Contributing

Acknowledgements

This crate was inspired by rust-native-tls and crypto-bench.

Legal

crypto-hash is copyrighted under the terms of the MIT license. See LICENSE for details.

Dependencies

~1MB