Raindex SDK Documentation
    Preparing search index...

    Function keccak256

    • Computes the keccak256 hash of raw byte data, commonly used for creating deterministic identifiers and verifying data integrity.

      const data = new Uint8Array([1, 2, 3, 4, 5]);
      const result = await keccak256(data);
      if (result.error) {
      console.error("Hash generation failed:", result.error.readableMsg);
      }
      const hash = result.value;
      // Do something with the hash

      Parameters

      • bytes: Uint8Array

        Raw byte array to hash (Uint8Array in JavaScript)

      Returns WasmEncodedResult<string>

      Hex-encoded hash with 0x prefix (66 characters total)