Skip to content

zpmep/hmacutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hmacutil

Small HMAC utilities for Golang

Download

go get github.com/zpmep/hmacutil

Features

  • Computes HMAC using secret key
  • Hex string encoded
  • Base64 encoded
  • Algorithm supports:
    • MD5
    • SHA1
    • SHA256
    • SHA512

Examples

// Computes HMAC
mac := hmacutil.Encode(hmacutil.SHA256, "secret_key", "data")

// Computes HMAC in hex string encoded
mac := hmacutil.HexStringEncode(hmacutil.SHA256, "secret_key", "data")

// Computes HMAC in base64 encoded
mac := hmacutil.Base64Encode(hmacutil.SHA256, "secret_key", "data")

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages