import { ckbHasher } from "@ckb-cobuild/ckb-hasher";
const hasher = ckbHasher().update(Uint8Array.of(0x12, 0x34));
hasher.digest();
// => Uint8Array(32) [
// 130, 245, 74, 244, 20, 136, 1, 184,
// 232, 132, 137, 17, 187, 108, 182, 187,
// 242, 111, 0, 171, 38, 231, 81, 92,
// 250, 174, 43, 48, 9, 110, 144, 126
// ]
hasher.digest("hex");
// => 82f54af4148801b8e8848911bb6cb6bbf26f00ab26e7515cfaae2b30096e907e
Generated using TypeDoc
Create a CKB Hasker.