Compute a 32-byte BLAKE2b-256 hash.
This is the default hash algorithm used by the Polkadot ecosystem and the Bulletin Chain. Deterministic: same input always produces the same output.
Arbitrary bytes to hash.
32-byte BLAKE2b-256 digest.
import { blake2b256, bytesToHex } from "@polkadot-apps/utils";const hash = blake2b256(new TextEncoder().encode("hello"));console.log(bytesToHex(hash)); // 64-char hex string Copy
import { blake2b256, bytesToHex } from "@polkadot-apps/utils";const hash = blake2b256(new TextEncoder().encode("hello"));console.log(bytesToHex(hash)); // 64-char hex string
Compute a 32-byte BLAKE2b-256 hash.
This is the default hash algorithm used by the Polkadot ecosystem and the Bulletin Chain. Deterministic: same input always produces the same output.