MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / digest_hex

Function digest_hex

atomic-repository/src/oci.rs:297–299  ·  view source on GitHub ↗

Strip the `sha256:` prefix from a digest, yielding the bare hex used as a blob filename.

(digest: &str)

Source from the content-addressed store, hash-verified

295/// Strip the `sha256:` prefix from a digest, yielding the bare hex used as a
296/// blob filename.
297fn digest_hex(digest: &str) -> &str {
298 digest.strip_prefix("sha256:").unwrap_or(digest)
299}
300
301/// Lowercase-hex encode bytes.
302fn hex_encode(bytes: &[u8]) -> String {

Callers 1

write_image_layoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected