{"id":74079,"library":"chmike-cmac-go","title":"CMAC Go","description":"Implements the Cipher-based Message Authentication Code (CMAC) as defined in RFC4493 and NIST SP 800-38B.","status":"active","version":"1.1.0","language":"go","source_language":null,"source_url":"https://github.com/chmike/cmac-go","tags":["crypto","mac","aes","authentication"],"install":[{"cmd":"go get github.com/chmike/cmac-go","lang":"bash","label":"Install github.com/chmike/cmac-go"}],"dependencies":[],"imports":[{"symbol":"cmac","correct":"github.com/chmike/cmac-go"}],"quickstart":{"code":"package main\n\nimport (\n\t\"crypto/aes\"\n\t\"fmt\"\n\t\"github.com/chmike/cmac-go\"\n)\n\nfunc main() {\n\tblock, _ := aes.NewCipher([]byte(\"0123456789abcdef\"))\n\tmac := cmac.New(block)\n\tmac.Write([]byte(\"message\"))\n\tfmt.Printf(\"%x\", mac.Sum(nil))\n}","lang":"go","description":"Computes an AES-CMAC for a message"},"warnings":[{"fix":"Replace mac.Sum(nil) comparison with cmac.Equal(mac1, mac2).","message":"Use cmac.Equal for constant-time comparison to avoid timing side-channels.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-38':20 '800':19 'ae':24 'authent':9,25 'b':21 'base':7 'cipher':6 'cipher-bas':5 'cmac':1,11 'code':10 'crypto':22 'defin':13 'go':2 'implement':3 'mac':23 'messag':8 'nist':17 'rfc4493':15 'sp':18","created_at":"2026-06-17T18:58:39.736183+00:00","updated_at":"2026-06-17T18:58:39.736183+00:00","problems":[],"ecosystem":"go","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/chmike/cmac-go","github":"https://github.com/chmike/cmac-go","docs":"https://pkg.go.dev/github.com/chmike/cmac-go#section-documentation","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["crypto"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-12-14","install_tag":null}}