title: Create HMAC_256 from a string in Golang
body: <p>I am trying to generate a HMAC 256 hash from a message and secret. However when I return it, it is not correct.</p>
  
  <pre><code>func makeSig(s Signature) string {
      secretHash := md5.New()
      secretHash.Write([]byte("secret"))
      key := secretHash.Sum(nil)
      fmt.Println("The secret key is ", hex.EncodeToString(key))
  
      message := strings.Join([]string{"one", "two", "three"}, "")
      fmt.Println("The message is ", message)
  
      sig := hmac.New(sha256.New, key)
      sig.Write([]byte(message))
      return hex.EncodeToString(sig.Sum(nil))
  }
  </code></pre>
  
  <p>I'm not sure what's wrong, please advise.</p>