#crypto #meta #hash #digest

crypto-hashes

Meta crate for cryptographic hash functions written in pure Rust

7 releases (breaking)

0.10.0 Dec 10, 2021
0.9.0 Jul 16, 2020
0.7.0 Nov 15, 2017
0.4.0 Apr 6, 2017
0.1.0 Nov 12, 2016

#891 in Cryptography

Download history 222/week @ 2022-08-14 296/week @ 2022-08-21 183/week @ 2022-08-28 296/week @ 2022-09-04 135/week @ 2022-09-11 275/week @ 2022-09-18 256/week @ 2022-09-25 185/week @ 2022-10-02 138/week @ 2022-10-09 112/week @ 2022-10-16 149/week @ 2022-10-23 267/week @ 2022-10-30 287/week @ 2022-11-06 310/week @ 2022-11-13 214/week @ 2022-11-20 160/week @ 2022-11-27

1,005 downloads per month
Used in 6 crates (4 directly)

MIT/Apache

7KB

rust-crypto's meta crates Build Status

This repository provides meta-crates of rust-crypto project.


lib.rs:

Collection of cryptographic hash functions written in pure Rust. This crate provides convenient re-exports from other crates. Additionally it's a no_std crate, so it can be easily used in embedded applications.

Supported algorithms

Algorithms marked by [weak] are not included by default. To use them enable include_weak crate feature.

Usage

use crypto_hashes::digest::Digest;
use crypto_hashes::sha3::Sha3_256;

// create a SHA3-256 object
let mut hasher = Sha3_256::default();

// write input message
hasher.update(b"abc");

// read result (this will consume hasher)
let out = hasher.finalize();

assert_eq!(out[..], [0x3a, 0x98, 0x5d, 0xa7, 0x4f, 0xe2, 0x25, 0xb2,
                     0x04, 0x5c, 0x17, 0x2d, 0x6b, 0xd3, 0x90, 0xbd,
                     0x85, 0x5f, 0x08, 0x6e, 0x3e, 0x9d, 0x52, 0x5b,
                     0x46, 0xbf, 0xe2, 0x45, 0x11, 0x43, 0x15, 0x32]);

Dependencies

~1.5MB
~16K SLoC