integrity

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package integrity provides checksum and payload hash computation for snapshots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputeDescriptorChecksum

func ComputeDescriptorChecksum(desc *model.Descriptor) (model.HashValue, error)

ComputeDescriptorChecksum computes SHA-256 checksum of the descriptor. Excludes: descriptor_checksum, integrity_state (per spec 04) Includes all other fields to ensure tamper detection.

func ComputePayloadRootHash

func ComputePayloadRootHash(root string) (model.HashValue, error)

ComputePayloadRootHash computes a deterministic hash of the entire payload tree. Algorithm: walk in byte-order sorted path order, compute per-entry hash, concatenate all lines, hash the result.

func ComputePayloadRootHashWithExclusions

func ComputePayloadRootHashWithExclusions(root string, excluded func(rel string) bool) (model.HashValue, error)

ComputePayloadRootHashWithExclusions computes a payload hash while skipping any workspace-relative paths reported as excluded.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL