Skip to main content

sha256_hex

Function sha256_hex 

Source
pub fn sha256_hex(bytes: &[u8]) -> String
Expand description

A bare (no sha256: prefix) lowercase hex SHA-256 digest of bytes. Used where the wire already names the hash algorithm by convention rather than in the value itself – HarnessMailRefV1::WorkspacePath.sha256 and the node’s own WorkspaceFileRevision are both this shape (unlike the context pack digest above, which reuses the prefixed sha256:<hex> form since it must distinguish itself from any other hash the wire might one day carry for the same object). Plain SHA-256 with no domain separation: a workspace file’s bytes are not reused as an input to any other digest this wire computes, so there is nothing for a domain tag to separate it from.