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§
- Digest
- Fixed-capacity digest bytes for either object format.
- Hasher
- Incremental hasher for a chosen object format.
Enums§
- Hash
Error - Object
Format - Repository object-format hash algorithm.
Functions§
- hash_
bytes - Hash arbitrary bytes with the given object format.
- hash_
object - Hash uncompressed Git object bytes:
type SP size NUL+payload.