Skip to main content

Crate arks_hash

Crate arks_hash 

Source
Expand description

In-engine hashing for Git object identity.

Contract (M1): compute digests of uncompressed object bytes (type SP size NUL + payload) matching stock Git for the claimed object formats. No I/O. No gix. No git subprocess.

SHA-1 uses Marc Stevens collision detection (sha1collisiondetection) — detect+refuse on cryptanalytic collision attacks (OBJ-004 Claimed slice). Absolute cryptographic immunity remains Impossible.

Primary: https://git-scm.com/docs/gitformat-loose Cite: .spec/research/20261108071913-git-objects-pack.research.md .spec/research/20261110222000-remaining-gaps-ffi-external-unblock.research.md

Structs§

ContainerHasher
Incremental hardware-accelerated container-trailer hasher for non-object Git container files (.git/index, .pack, .idx, commit-graph, multi-pack-index).
Digest
Fixed-capacity digest bytes for either object format.
Hasher
Incremental hasher for a chosen object format.

Enums§

HashError
ObjectFormat
Repository object-format hash algorithm.

Functions§

hash_bytes
Hash arbitrary bytes with the given object format (with OBJ-004 SHA-1 collision detection).
hash_container_bytes
Fast container-trailer digest for non-object Git container files (.git/index, .pack, .idx, commit-graph, multi-pack-index).
hash_object
Hash uncompressed Git object bytes: type SP size NUL + payload.