Versions in this module Expand all Collapse all v1 v1.0.0 Sep 28, 2023 Changes in this version + func BytesToInt(b []byte) uint64 + func BytesToString(b []byte) string + func Generate2048RSAKey() (pri, pub []byte, err error) + func GenerateRSAKey(bits int) (pri, pub []byte, err error) + func GetClientIp(ctx *gin.Context) string + func GetLocalIp() string + func IntToBytes(n uint64) []byte + func IsFileExists(filePath string) bool + func JSONBytesToStruct(jsonByte []byte, s interface{}) error + func JSONStrToStruct(jsonStr string, s interface{}) error + func Join(sep string, elems []uint64) string + func LoadConf(configPath string, s interface{}) error + func MD5(content string) string + func MapToStruct(mp map[string]string, s interface{}) error + func RandomID() string + func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error) + func RsaEncrypt(origData, publicKey []byte) ([]byte, error) + func StringToBytes(s string) (b []byte) + func Substr(str string, start int, length int) string