Documentation
¶
Index ¶
- func AddString(s ...string) string
- func AddStringBytes(s ...string) []byte
- func AesCBCDeB64(s, key string) []byte
- func AesCBCDeHex(s, key string) []byte
- func AesCBCDePKCS7B64(s, key string) []byte
- func AesCBCDePKCS7Hex(s, key string) []byte
- func AesCBCDePKCS7StringB64(s, key string) string
- func AesCBCDePKCS7StringHex(s, key string) string
- func AesCBCDeStringB64(s, key string) string
- func AesCBCDeStringHex(s, key string) string
- func AesCBCDecrypt(asPKCS7 bool, b, key []byte, ivs ...[]byte) []byte
- func AesCBCEnB64(b, key []byte) string
- func AesCBCEnHex(b, key []byte) string
- func AesCBCEnPKCS7B64(b, key []byte) string
- func AesCBCEnPKCS7Hex(b, key []byte) string
- func AesCBCEnPKCS7StringB64(s, key string) string
- func AesCBCEnPKCS7StringHex(s, key string) string
- func AesCBCEnStringB64(s, key string) string
- func AesCBCEnStringHex(s, key string) string
- func AesCBCEncrypt(asPKCS7 bool, b, key []byte, ivs ...[]byte) []byte
- func AssertEqual(t testing.TB, expected, actual interface{}, description ...string)
- func AssertPanics(t *testing.T, title string, f func())
- func B2S(b []byte) string
- func B64Decode(s string) string
- func B64Encode(s string) string
- func B64UrlDecode(s string) string
- func B64UrlEncode(s string) string
- func CallPath() string
- func CopyBytes(b []byte) []byte
- func CopyString(s string) string
- func Decrypt(value, secret string) string
- func DesCBCDeB64(s, key string) []byte
- func DesCBCDeHex(s, key string) []byte
- func DesCBCDePKCS7B64(s, key string) []byte
- func DesCBCDePKCS7Hex(s, key string) []byte
- func DesCBCDePKCS7StringB64(s, key string) string
- func DesCBCDePKCS7StringHex(s, key string) string
- func DesCBCDeStringB64(s, key string) string
- func DesCBCDeStringHex(s, key string) string
- func DesCBCDecrypt(asPKCS7 bool, b, key []byte, ivs ...[]byte) []byte
- func DesCBCEnB64(b, key []byte) string
- func DesCBCEnHex(b, key []byte) string
- func DesCBCEnPKCS7B64(b, key []byte) string
- func DesCBCEnPKCS7Hex(b, key []byte) string
- func DesCBCEnPKCS7StringB64(s, key string) string
- func DesCBCEnPKCS7StringHex(s, key string) string
- func DesCBCEnStringB64(s, key string) string
- func DesCBCEnStringHex(s, key string) string
- func DesCBCEncrypt(asPKCS7 bool, b, key []byte, ivs ...[]byte) []byte
- func Encrypt(value, secret string) string
- func GetBytes(v interface{}, defaultVal ...[]byte) []byte
- func GetInt(v interface{}, defaultInt ...int) int
- func GetString(v interface{}, defaultVal ...string) string
- func GetenvDecrypt(key string, secret string) string
- func Hash(b []byte, h hash.Hash) []byte
- func Hmac(b []byte, key []byte, h func() hash.Hash) []byte
- func HmacSHA1(b, key []byte) []byte
- func HmacSHA1Hex(s, key string) string
- func HmacSHA256(b, key []byte) []byte
- func HmacSHA256Hex(s, key string) string
- func HmacSHA512(b, key []byte) []byte
- func HmacSHA512Hex(s, key string) string
- func InInts(slice []int, n int) bool
- func InStrings(ss []string, s string) bool
- func IsDir(s string) bool
- func IsExist(s string) bool
- func IsFile(s string) bool
- func JoinBytes(b ...[]byte) []byte
- func MD5(b []byte) []byte
- func MD5Hex(s string) string
- func MD5Reader(r io.Reader) (string, error)
- func MD5Sum(filename string) (string, error)
- func MaxInt(a, b int) int
- func MinInt(a, b int) int
- func MustBool(v interface{}) bool
- func MustInt(v interface{}) int
- func MustJSON(v interface{}) []byte
- func MustJSONString(v interface{}) string
- func MustString(v interface{}) string
- func Padding(b []byte, bSize int, pkcs7 bool) []byte
- func RandInt(min int, max int) int
- func RandString(n int) string
- func Round(val float64, precision int) float64
- func RunPath() string
- func S2B(s string) (b []byte)
- func SearchInt(slice []int, n int) int
- func SearchString(ss []string, s string) int
- func SetenvEncrypt(key, value, secret string) (string, error)
- func Sha1(b []byte) []byte
- func Sha1Hex(s string) string
- func Sha256(b []byte) []byte
- func Sha256Hex(s string) string
- func Sha512(b []byte) []byte
- func Sha512Hex(s string) string
- func UnPadding(b []byte, pkcs7 bool) []byte
- func WaitNextMinute()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesCBCDePKCS7StringB64 ¶
AES 解密, Pkcs7Padding
func AesCBCDePKCS7StringHex ¶
AES 解密, Pkcs7Padding
func AesCBCDecrypt ¶
AES-CBC 解密, 密码分组链接模式 (Cipher Block Chaining (CBC))
func AesCBCEnPKCS7StringB64 ¶
AES 加密, Pkcs7Padding
func AesCBCEnPKCS7StringHex ¶
AES 加密, Pkcs7Padding
func AesCBCEncrypt ¶
AES-CBC 加密, 密码分组链接模式 (Cipher Block Chaining (CBC)) key 长度分别是 16 (AES-128), 24 (AES-192?), 32 (AES-256?) asPKCS7: false (ZerosPadding), true (Pkcs7Padding)
func AssertEqual ¶
AssertEqual checks if values are equal Ref: gofiber/utils
func DesCBCDePKCS7StringB64 ¶
DES 解密, Pkcs7Padding
func DesCBCDePKCS7StringHex ¶
DES 解密, Pkcs7Padding
func DesCBCDecrypt ¶
DES-CBC 解密, 密码分组链接模式 (Cipher Block Chaining (CBC))
func DesCBCEnPKCS7StringB64 ¶
DES 加密, Pkcs7Padding
func DesCBCEnPKCS7StringHex ¶
DES 加密, Pkcs7Padding
func DesCBCEncrypt ¶
DES-CBC 加密, 密码分组链接模式 (Cipher Block Chaining (CBC)) key 长度固定为 8 asPKCS7: false (ZerosPadding), true (Pkcs7Padding)
Types ¶
This section is empty.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.