Skip to content

Instantly share code, notes, and snippets.

@turret-io
turret-io / verify_hmac.go
Last active August 29, 2015 14:06
Verify HMAC in Go
package main
import (
"crypto/hmac"
"crypto/sha512"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"net/url"
@turret-io
turret-io / gen_hmac.go
Created September 24, 2014 15:28
Generate HMAC in Go
package main
import (
"crypto/hmac"
"crypto/sha512"
"encoding/base64"
"encoding/json"
"fmt"
"strconv"
"time"