Go Cheatsheet - Hmac
Hmac
Use crypto/hmac to calculate message authentication code.
hmac & use md5 as digest method
package main
import (
"fmt"
"crypto/hmac"
"crypto/md5"
)
func main() {
key := []byte("hello")
msg := []byte("world")
mac := hmac....
hn.0xbf.me1 min read