Documentation ¶
Index ¶
- Constants
- Variables
- func CutPadKey(key string, size int) string
- func Pkcs7Pad(data []byte, size int) []byte
- func Pkcs7Unpad(data []byte) []byte
- func Salt(chars, salt, src string) string
- func Unsalt(chars, salt, src string) string
- type AesCBC
- func (ac *AesCBC) DecryptData(src []byte) (des []byte, err error)
- func (ac *AesCBC) DecryptString(src string) (string, error)
- func (ac *AesCBC) EncryptData(src []byte) (des []byte, err error)
- func (ac *AesCBC) EncryptString(src string) (string, error)
- func (ac *AesCBC) SetIV(iv string)
- func (ac *AesCBC) SetKey(key string)
- type AesCFB
- func (ac *AesCFB) DecryptData(src []byte) ([]byte, error)
- func (ac *AesCFB) DecryptString(src string) (string, error)
- func (ac *AesCFB) EncryptData(src []byte) ([]byte, error)
- func (ac *AesCFB) EncryptString(src string) (string, error)
- func (ac *AesCFB) SetIV(iv string)
- func (ac *AesCFB) SetKey(key string)
- type Cryptor
- type Token
- type Tokener
Constants ¶
View Source
const (
SecretChars = str.Base64URL
)
Variables ¶
View Source
var ( ErrTokenLength = errors.New("invalid token length") ErrTokenTimestamp = errors.New("invalid token timestamp") )
Functions ¶
func CutPadKey ¶ added in v1.0.14
CutPadKey cut key if key's length is greater than 'size', or pad key with space if key's length is smaller than 'size'.
func Pkcs7Unpad ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.