Documentation
¶
Overview ¶
*
@author: taco @Date: 2023/9/1 @Time: 9:30
*
*
@author: taco @Date: 2023/7/26 @Time: 17:47
*
*
@author: taco @Date: 2023/7/21 @Time: 13:44
*
*
@author: taco @Date: 2023/7/21 @Time: 15:40
*
Index ¶
- func AesDecrypt(data []byte, key []byte) ([]byte, error)
- func AesDecryptByCTR(dataBase64, key string) string
- func AesEncrypt(data []byte, key []byte) ([]byte, error)
- func AesEncryptByCTR(data, key string) (string, string)
- func CheckPassword(password string) bool
- func CheckPasswordAes(password, salt, key, baseCode string) bool
- func CreateToken(exp int, UserId, TenantID uint, privateKey string, loginTime time.Time) (string, int64, error)
- func DecryptByAes(data string, key []byte) ([]byte, error)
- func EnHex(text string) string
- func EncryptByAes(data []byte, key []byte) (string, error)
- func GenRsaKey() (prvkey, pubkey []byte, err error)
- func GenerateTicket(pfx string, l int) string
- func IsNumber(str string) bool
- func Md5SumWithString(hash string, salt string) string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func Password(password string, salt string) string
- func RandSalt(n int) string
- func Random() (string, error)
- func RsaDecrypt(ciphertext, keyBytes []byte) ([]byte, error)
- func RsaEncrypt(data, keyBytes []byte) ([]byte, error)
- func RsaSignWithSha256(data []byte, keyBytes []byte) ([]byte, error)
- func RsaVerySignWithSha256(data, signData, keyBytes []byte) (bool, error)
- func ToUp(sign string) string
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
- type CustomClaims
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesEncryptByCTR ¶
func CheckPassword ¶
func CheckPasswordAes ¶
func CreateToken ¶
func EncryptByAes ¶
EncryptByAes Aes加密 后 base64 再加
func GenerateTicket ¶
func Md5SumWithString ¶
func RsaVerySignWithSha256 ¶
验证
Types ¶
type CustomClaims ¶
Click to show internal directories.
Click to hide internal directories.