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

Method FromString

algorithm.go:174–176  ·  view source on GitHub ↗

FromString digests the string input and returns a Digest.

(s string)

Source from the content-addressed store, hash-verified

172
173// FromString digests the string input and returns a Digest.
174func (a Algorithm) FromString(s string) Digest {
175 return a.FromBytes([]byte(s))
176}
177
178// Validate validates the encoded portion string
179func (a Algorithm) Validate(encoded string) error {

Callers 2

FromStringFunction · 0.80
TestFromsFunction · 0.80

Calls 1

FromBytesMethod · 0.95

Tested by 1

TestFromsFunction · 0.64