Documentation
¶
Index ¶
Constants ¶
View Source
const (
DomainName = "hmac"
)
Variables ¶
View Source
var ( ErrTokenSignatureMismatch = errors.New("token signature mismatch") ErrInvalidTokenFormat = errors.New("invalid token") )
Functions ¶
func HashByteSecret ¶
HashByteSecret hashes the secret for consumption by the AEAD encryption algorithm which expects exactly 32 bytes.
The system secret is being hashed to always match exactly the 32 bytes required by AEAD, even if the secret is long or shorter.
func HashStringSecret ¶
HashStringSecret hashes the secret for consumption by the AEAD encryption algorithm which expects exactly 32 bytes.
The system secret is being hashed to always match exactly the 32 bytes required by AEAD, even if the secret is long or shorter.
func RandomBytes ¶
RandomBytes returns n random bytes by reading from crypto/rand.Reader
Types ¶
Click to show internal directories.
Click to hide internal directories.