---
title: "Discussion on \"Go Cheatsheet - Hmac\" | Hashnode"
description: "Discussion on \"Go Cheatsheet - Hmac\". Hmac\nUse crypto/hmac to calculate message authentication code.\nhmac & use md5 as digest method\npackage main\n\nimport (\n    \"fmt\"\n    \"crypto/hmac\"\n    \"crypto/md5\"\n)\n\nfunc main() {\n    key := []byte(\"hello\")\n    msg := []byte(\"world\")\n    mac := hmac...."
url: "https://hashnode.com/posts/go-cheatsheet-hmac/608ac87bf80abf020dc60317"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Go Cheatsheet - Hmac](https://hn.0xbf.me/go-cheatsheet-hmac?utm_source=hashnode&utm_medium=feed)

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....

Apr 29, 2021 · 1 min read · hn.0xbf.me  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[0xBF](https://hashnode.com/@0xbf)

@0xbf

  
[View profile](https://hashnode.com/@0xbf)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
