MCPcopy Create free account
hub / github.com/opencontainers/go-digest / Digester

Method Digester

algorithm.go:109–114  ·  view source on GitHub ↗

Digester returns a new digester for the specified algorithm. If the algorithm does not have a digester implementation, nil will be returned. This can be checked by calling Available before calling Digester.

()

Source from the content-addressed store, hash-verified

107// does not have a digester implementation, nil will be returned. This can be
108// checked by calling Available before calling Digester.
109func (a Algorithm) Digester() Digester {
110 return &digester{
111 alg: a,
112 hash: a.Hash(),
113 }
114}
115
116// Hash returns a new hash as used by the algorithm. If not available, the
117// method will panic. Check Algorithm.Available() before calling.

Callers 2

FromReaderMethod · 0.95
FromBytesMethod · 0.95

Calls 1

HashMethod · 0.95

Tested by

no test coverage detected