# Reference fingerprints

```python
from hashlib import sha256
from pipewhy.fingerprint.records import FingerprintContext, Mode
from pipewhy.fingerprint.state import fingerprint
from pipewhy.normalize.records import encode_record

schema_id = sha256(b"field 0: uint64; exclusions: none").hexdigest()
context = FingerprintContext(schema_id, mode=Mode.MULTISET)
records = [encode_record([(0, value)]) for value in (10, 20, 10)]
whole = fingerprint(records, context)
parts = fingerprint(records[:1], context).merge(fingerprint(records[1:], context))
assert whole == parts
```

The experimental `blake2b-sum256-v1` reference detects accidental drift using
complete-record BLAKE2b-256 contributions, a modular sum and an exact count.
Supply a schema identity covering the actual selected source fields/types and
exclusions. Ordered mode uses original global offsets and merges adjacent ranges.
Removal requires known contained records, or an original-position ordered suffix.
Persist the full context beside state words. Different contexts are incompatible.

Fingerprint equality is probabilistic evidence. No quantitative collision bound,
tamper resistance, external production approval or native CPU/CUDA performance
qualification is claimed. See [blueprint/FINGERPRINT_CONTRACT.txt](../development/architecture.rst) for the exact
algorithm, portable fixtures and suitability-review status.
