INNER CODE UNIT · Go
sha256Hex
cc1a2b/JShunter · internal/jshunter/aws_pair.go:176
func sha256Hex(b []byte) string {
h := sha256.Sum256(b)
return hex.EncodeToString(h[:])
}
func hmacBytes(key, msg []byte) []byte {
m := hmac.New(sha256.New, key)
m.Write(msg)
return m.Sum(nil)
}
func hmacHex(key, msg []byte) string {
return hex.EncodeToString(hmacBytes(key, msg))
}