Skip to main content

content_id

Function content_id 

Source
pub fn content_id(segments: &[&[u8]]) -> u128
Expand description

A deterministic 128-bit content id over segments, the concatenation of which is the content being addressed. Two independently salted FNV-1a passes fill the high and low halves, so the same segments always yield the same id and a different input yields a different one. The caller assembles the segments (e.g. an owner, a discriminator byte, and a body) and the order is part of the contract.