Documentation ¶
Index ¶
- Constants
- func AesDecryptCBC(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptCFB(encrypted []byte, key []byte) (decrypted []byte)
- func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)
- func AesEncryptCBC(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptCFB(origData []byte, key []byte) (encrypted []byte)
- func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)
- func AssertMarshal(v interface{}, params ...int) string
- func Base64Decode(str string) (string, error)
- func Base64Encode(str string) string
- func ConvertByte2String(byte []byte, charset Charset) string
- func Des3Decrypt(key3Des []byte, sec string) (string, error)
- func Des3Encrypt(key3Des []byte, source string) (string, error)
- func DesDecrypt(crypted, key []byte) ([]byte, error)
- func DesEncrypt(origData, key []byte) ([]byte, error)
- func ExecCmd(dir string, str string) (string, error)
- func ExecCmd2(ctx context.Context, runDir string, cmd string) (string, error)
- func FunFuncName() string
- func FuncName() string
- func GbkToUtf8(s []byte) ([]byte, error)
- func GetBinDir() string
- func GetBinDirNew() string
- func GetBinName() string
- func GetBody(r *http.Request) []byte
- func GetDateByN(n int) int64
- func GetFieldName(t reflect.Type) (map[string]string, error)
- func GetHmac(key string, data string) string
- func GetHmacSha256(key string, data string) string
- func GetIPv4() string
- func GetIndexByWeigth(data []int) int
- func GetLocalMac() string
- func GetMd5(data string) string
- func GetMysqlParam(n int) string
- func GetPidByWindows(name string) (rets []int)
- func GetPosInfo() (string, int)
- func GetPosInfoSplit() string
- func GetPosInfoStr() string
- func GetSecondByDay00() int64
- func GetSecondFromDay() int64
- func GetSecondFromHour() int64
- func GetSecondFromMonth() int64
- func GetSecondFromWeek() int64
- func GetSha1(data string) string
- func GetSignal() int
- func GetTDayByUnixTime(nowUnix int64) int64
- func HideStar(str string) (result string)
- func IPIPToUint32(ipnr net.IP) (sum uint32, err error)
- func IPStringToUint32(ipString string) (sum uint32, err error)
- func IPUint32ToIP(intIP uint32) net.IP
- func IsGBK(data []byte) bool
- func IsUtf8(data []byte) bool
- func MonitorStatus(interTime time.Duration, param ...func() string)
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func PathExists(path string) bool
- func PidByBinName(binName string) []int
- func PrintEncode(str string) (newStr string)
- func Profiling(msg string) func()
- func RandGenerate(n int) string
- func RandMN(min int, max int) int
- func RsaDecrypt(privateKey []byte, origData string) ([]byte, error)
- func RsaEncrypt(publicKey []byte, data []byte) (string, error)
- func RunFuncName() string
- func RunPprof(addr string)
- func TarGz(src string, dest string) error
- func TripleDesDecrypt(crypted, key []byte) ([]byte, error)
- func TripleDesEncrypt(origData, key []byte) ([]byte, error)
- func Unzip(zipPath, dstDir string) error
- func UrlDecode(str string) (string, error)
- func UrlEncode(str string) string
- func Utf8ToGbk(s []byte) ([]byte, error)
- func ZeroPadding(ciphertext []byte, blockSize int) []byte
- func ZeroUnPadding(origData []byte) []byte
- func Zip(zipPath string, paths ...string) error
- type Charset
- type TplJson
Constants ¶
View Source
const ( UTF8 = Charset("UTF-8") GB18030 = Charset("GB18030") GBK = Charset("GBK") )
Variables ¶
This section is empty.
Functions ¶
func AesDecryptCBC ¶ added in v1.3.7
func AesDecryptCFB ¶ added in v1.3.7
func AesDecryptECB ¶ added in v1.3.7
func AesEncryptCBC ¶ added in v1.3.7
=================== CBC ======================
func AesEncryptCFB ¶ added in v1.3.7
=================== CFB ======================
func AesEncryptECB ¶ added in v1.3.7
=================== ECB ======================
func AssertMarshal ¶
func ConvertByte2String ¶
func DesDecrypt ¶
func DesEncrypt ¶
func FunFuncName ¶
func FunFuncName() string
func GetBinDirNew ¶ added in v1.1.6
func GetBinDirNew() string
func GetBinName ¶ added in v1.1.4
func GetBinName() string
func GetHmacSha256 ¶
func GetIndexByWeigth ¶
func GetMysqlParam ¶
func GetPidByWindows ¶ added in v1.1.2
func GetPosInfo ¶
func GetPosInfoSplit ¶ added in v1.1.1
func GetPosInfoSplit() string
func GetPosInfoStr ¶
func GetPosInfoStr() string
func IPStringToUint32 ¶ added in v1.2.7
func IPUint32ToIP ¶ added in v1.2.8
func MonitorStatus ¶ added in v1.1.2
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func PidByBinName ¶ added in v1.1.2
func PrintEncode ¶ added in v1.3.7
func RandGenerate ¶ added in v1.3.4
func RunFuncName ¶
func RunFuncName() string
func Unzip ¶ added in v1.3.8
Unzip decompresses a zip file to specified directory. Note that the destination directory don't need to specify the trailing path separator.
func ZeroPadding ¶
func ZeroUnPadding ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.