code: func checkShortMatch(alg digest.Algorithm, hex, shortAlg, shortHex string) bool {
  	if len(hex) == len(shortHex) {
  		if hex != shortHex {
  			return false
  		}
  		if len(shortAlg) > 0 && string(alg) != shortAlg {
  			return false
  		}
  	} else if !strings.HasPrefix(hex, shortHex) {
  		return false
  	} else if len(shortAlg) > 0 && string(alg) != shortAlg {
  		return false
  	}
  	return true
  }
docs: // checkShortMatch checks whether two digests match as either whole
  // values or short values. This function does not test equality,
  // rather whether the second value could match against the first
  // value.