| Crates.io | elabs-k256 |
| lib.rs | elabs-k256 |
| version | 0.1.1 |
| created_at | 2022-02-09 05:51:09.969214+00 |
| updated_at | 2022-02-09 09:00:40.767009+00 |
| description | Elabs K256: Keccak-256 wrapper |
| homepage | |
| repository | https://github.com/pentalabs/elabs/tree/master/elabs-k256 |
| max_upload_size | |
| id | 529527 |
| size | 39,869 |
Elabs-k256 is a wrapper around the tiny_keccak::Keccak::v256() Hasher. It give a simple interface to use the Hasher.
To use elabs_k256, you need to import the elabs_k256 crate and use the k256 or k256_hash function.
[dependencies]
elabs_k256 = "0.1"
use elabs_k256::k256;
//!
fn main() {
let input = "Hello World";
let hash = k256(input);
println!("{:?}", hash);
}
use elabs_k256::k256_hash;
//!
fn main() {
let input = "Hello World";
let mut hash = [0u8; 32];
k256_hash(input, &mut hash);
println!("{:?}", hash);
}