Documentation ¶
Overview ¶
Package hmac provides HMAC signing methods for JWT.
Index ¶
- Variables
- func SignHS256(token string, secret interface{}) (string, error)
- func SignHS384(token string, secret interface{}) (string, error)
- func SignHS512(token string, secret interface{}) (string, error)
- func VerifyHS256(token, signature string, secret interface{}) error
- func VerifyHS384(token, signature string, secret interface{}) error
- func VerifyHS512(token, signature string, secret interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrVerifyFailed is returned when signature verification fails. ErrVerifyFailed = errors.New("jwt/hmac: verification failed") // ErrUnsupportedKeyType is returned when the secret is not a supported type. ErrUnsupportedKeyType = errors.New("jwt/hmac: unsupported key type") )
Functions ¶
func VerifyHS256 ¶
VerifyHS256 verifies the given signature using the given secret.
func VerifyHS384 ¶
VerifyHS384 verifies the given signature using the given secret.
func VerifyHS512 ¶
VerifyHS512 verifies the given signature using the given secret.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.