Table of Contents

Class ContentHasher

Namespace
AgentContainers.Core.Hashing
Assembly
AgentContainers.Core.dll
Deterministic content hashing for manifest definitions and generated artifacts. All hashing normalizes line endings (CRLF → LF) and path separators (\ → /) so the same logical content produces the same hash on any platform.
public static class ContentHasher
Inheritance
ContentHasher
Inherited Members

Methods

ComputeContentHash(string)

Computes a SHA-256 hash of a string, normalizing line endings first.
public static string ComputeContentHash(string content)

Parameters

content string

Returns

string

ComputeManifestHash(string)

Computes a single SHA-256 hash over all YAML definitions in a directory tree. Files are processed in stable sorted order by their normalized relative path.
public static string ComputeManifestHash(string definitionsRoot)

Parameters

definitionsRoot string

Returns

string

NormalizePath(string)

Normalizes a relative file path to use forward slashes.
public static string NormalizePath(string path)

Parameters

path string

Returns

string