MCPcopy Create free account
hub / github.com/cli/cli / IsValidDigestAlgorithm

Function IsValidDigestAlgorithm

pkg/cmd/attestation/artifact/digest/digest.go:23–30  ·  view source on GitHub ↗

IsValidDigestAlgorithm returns true if the provided algorithm is supported

(alg string)

Source from the content-addressed store, hash-verified

21
22// IsValidDigestAlgorithm returns true if the provided algorithm is supported
23func IsValidDigestAlgorithm(alg string) bool {
24 for _, a := range validDigestAlgorithms {
25 if a == alg {
26 return true
27 }
28 }
29 return false
30}
31
32// ValidDigestAlgorithms returns a list of supported digest algorithms
33func ValidDigestAlgorithms() []string {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected