elabs-k256

Crates.ioelabs-k256
lib.rselabs-k256
version0.1.1
sourcesrc
created_at2022-02-09 05:51:09.969214
updated_at2022-02-09 09:00:40.767009
descriptionElabs K256: Keccak-256 wrapper
homepage
repositoryhttps://github.com/pentalabs/elabs/tree/master/elabs-k256
max_upload_size
id529527
size39,869
Ade Ramdani (noobiescoder)

documentation

README

Elabs-k256

Elabs-k256 is a wrapper around the tiny_keccak::Keccak::v256() Hasher. It give a simple interface to use the Hasher.

Usage

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"

Example

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);
}
Commit count: 0

cargo fmt