MPCL

Package hmac

Package hmac implements Keyed-Hash Message Authentication Code (HMAC) functions. All functions take the data that is authenticated and an authentication key.

   signature := hmac.SumSHA256([]byte("message"), []byte("abc"))
   => 859cc656e12c0ecd0afdd7e3d034c3ee81609fcac1b454c231211c7ac69895e8

Constants

This section is empty.

Variables

This section is empty.

Functions

func SumSHA256
func SumSHA256(data, key []byte) [sha256.Size]byte

SumSHA256 computes the HMAC-SHA256 signature for the data using the key.

func SumSHA512
func SumSHA512(data, key []byte) [sha512.Size]byte

SumSHA512 computes the HMAC-SHA512 signature for the data using the key.

Types

This section is empty.