Crate sha3_hash[−][src]
Expand description
sha3-hash
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 this library to Cargo.toml
:
[dependencies]
sha3-hash = "0.1"
Structs
Hash | Represents a SHA-3 hash (256 bits) |
TryFromHexError |