hmac

Imports

Imports #

"crypto/internal/boring"
"crypto/internal/fips140/hmac"
"crypto/internal/fips140hash"
"crypto/internal/fips140only"
"crypto/subtle"
"hash"

Functions

Equal function #

Equal compares two MACs for equality without leaking timing information.

func Equal(mac1 []byte, mac2 []byte) bool

New function #

New returns a new HMAC hash using the given [hash.Hash] type and key. New functions like [crypto/sha256.New] can be used as h. h must return a new Hash every time it is called. Note that unlike other hash implementations in the standard library, the returned Hash does not implement [encoding.BinaryMarshaler] or [encoding.BinaryUnmarshaler].

func New(h func() hash.Hash, key []byte) hash.Hash

Generated with Arrow