Versions in this module Expand all Collapse all v0 v0.1.1 Mar 23, 2023 Changes in this version + var ErrInputInvalidLength = errors.New("encoded message length must be more than zero") + var ErrInputNotMoreABlock = errors.New("decoded message length must be more than a block size") + var ErrInputNotMultipleBlocks = errors.New("decoded message length must be multiple of block size") + var ErrInvalidIvSize = errors.New("iv length must equal block size") + var ErrUnPaddingOutOfRange = errors.New("unPadding out of range") + func AesCbcDecrypt(key, cipherText string) ([]byte, error) + func AesCbcEncrypt(key string, rawText []byte) (string, error) + func ConcatArray(v any) string + func ConcatMap(mp map[string]any, hasBrace bool) string + func ConcatMapWithSort(mp map[string]string, sep1, sep2 string) string + func HexSha1(str string) string + func HexSha256(str string) string + func HexSha512(str string) string + func Hmac512(key, str string) string + func HmacSha1(key, str string) string + func HmacSha256(key, str string) string + func Iat() string + func IatSign(s string) (iat, sign string) + func IatSignWith(s string, hash func(iat, s string) string) (iat, sign string) + func PCKSPadding(origData []byte, blockSize int) []byte + func PCKSUnPadding(origData []byte, blockSize int) ([]byte, error) + func RsaDecrypt(pri *rsa.PrivateKey, ciphertext string) (string, error) + func RsaEncrypt(pub *rsa.PublicKey, rawText string) (string, error) + func Sign(mp map[string]any, secret string, sign func(string) string) string + func VerifyIat(iat string, availWindow time.Duration) bool + func VerifyIatSign(iat, targetSign, s string, iatTimout time.Duration) bool + func VerifyIatSignWith(iat, targetSign, s string, availWindow time.Duration, ...) bool + type H map[string]any