Skip to main content

compute_binary_hash

Function compute_binary_hash 

Source
pub fn compute_binary_hash(path: &Path) -> Result<BinaryHashResult>
Expand description

Compute comprehensive hash information for a binary file.

This function returns both a full file hash and a deterministic code hash that can be used to verify remote compilation correctness.

§Arguments

  • path - Path to the binary file

§Returns

A BinaryHashResult containing:

  • full_hash: Complete file hash (non-deterministic)
  • code_hash: Hash of code sections only (deterministic)
  • text_section_size: Size of executable code
  • is_debug: Whether debug symbols are present