Documentation ¶
Index ¶
- Constants
- func AesDecrypt(crypted, key []byte) ([]byte, error)
- func AesEncrypt(origData, key []byte) ([]byte, error)
- func CreateToken(data interface{}, expire time.Duration) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func ParseToken(token string, v interface{}) error
- func SetDefault(secretKey string)
- type Jwt
- type JwtError
- type Token
Constants ¶
View Source
const Expired = JwtError("jwt: token is expired") // nolint:errname
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
func AesEncrypt ¶
func CreateToken ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func ParseToken ¶
func SetDefault ¶
func SetDefault(secretKey string)
Types ¶
Click to show internal directories.
Click to hide internal directories.