Crates.io | sha3-hash |
lib.rs | sha3-hash |
version | 0.1.4 |
source | src |
created_at | 2021-06-19 11:53:01.522751 |
updated_at | 2021-06-23 02:19:05.548994 |
description | Easy-to-use SHA-3 library with Serde support |
homepage | https://github.com/printfn/sha3-hash |
repository | https://github.com/printfn/sha3-hash |
max_upload_size | |
id | 412073 |
size | 10,567 |
This library provides an easy-to-use SHA-3 hash type. It can be serialized and deserialized via Serde, and supports all expected operations.
Here is an example of how you might use this library to compute a SHA-3 hash:
let data = "Hello World!";
let hash = sha3_hash::Hash::hash_bytes(data.as_bytes());
// Prints: d0e47486bbf4c16acac26f8b653592973c1362909f90262877089f9c8a4536af
println!("{}", hash);
// Serializing the hash to a JSON string using `serde_json`
let json_string = serde_json::to_string(&hash).unwrap();
Adding sha3-hash to Cargo.toml
:
[dependencies]
sha3-hash = "0.1"