code: func hash(data []byte, algorithm digestAlgorithm) string {
  	switch algorithm {
  	case SHA256:
  		return fmt.Sprintf("%x", sha256.Sum256(data))
  	default:
  		return fmt.Sprintf("%x", md5.Sum(data))
  	}
  }
docs: // hash generates the hex digest of the given data using the given hashing
  // algorithm, which must be one of MD5 or SHA256.