| Crates.io | ckb-hash |
| lib.rs | ckb-hash |
| version | 1.0.1 |
| created_at | 2020-09-29 05:54:52.297148+00 |
| updated_at | 2025-12-18 07:24:38.425624+00 |
| description | CKB default hash function |
| homepage | https://github.com/nervosnetwork/ckb |
| repository | https://github.com/nervosnetwork/ckb |
| max_upload_size | |
| id | 293980 |
| size | 6,763 |
This crate is a component of ckb.
CKB default hash function.
If used in On-Chain Script, you need to disable the default features and enable ckb-contract.
default-features = false, features = ["ckb-contract"]
Example:
use ckb_hash::blake2b_256;
let input = b"ckb";
let digest = blake2b_256(&input);
println!("ckbhash({:?}) = {:?}", input, digest);