Skip to main content

ClikaRT::ops::hash_chain

function

hash_chain()

Tensor hash_chain(
    Tensor rows,
    Tensor parent,
    std::uint64_t seed = 0
)

Rowwise 128-bit CHAINED hash: for rows [N, ..] and a [2] UInt64 parent (zeros = the chain's zero element), row i's digest hashes (digest i-1 ‖ row i's packed bytes); one dispatch computes a whole sequence's rolling content hashes. Same portability contract as hash_64.

Parameters

  • rows: [N, ..], any byte-aligned dtype.
  • parent: [2] UInt64 chain seed; zeros start a fresh chain.
  • seed: key perturbation; 0 = the fixed content-addressing key.

Returns: [N, 2] UInt64; row i is the chain digest through row i.

Throws

  • ClikaRT::Error: (INVALID_ARGUMENT) when parent is not [2] UInt64 (code_name() carries the reason).

Declared in ClikaRT/compute/ops.h, line 4389