shithub: furgit

ref: df1f2fb3daa1acd25c88510f259d5535fb482126
dir: /object/id/algorithm_parse.go/

View raw version
package objectid

// ParseAlgorithm parses a canonical algorithm name (e.g. "sha1", "sha256").
func ParseAlgorithm(s string) (Algorithm, bool) {
	algo, ok := algorithmByName[s]

	return algo, ok
}