Polkadot Apps
    Preparing search index...
    • 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.

      Parameters

      • data: Uint8Array

        Arbitrary bytes to hash.

      Returns Uint8Array

      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