tools

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt added in v0.2.0

func AesDecrypt(cipherText []byte, key []byte) ([]byte, error)

aes_256_cbc decrypt

func AesEncrypt added in v0.2.0

func AesEncrypt(content []byte, key []byte) ([]byte, error)

aes_256_cbc encrypt

func CstZone added in v0.2.0

func CstZone() *time.Location

func DecryptString added in v0.2.0

func DecryptString(cipherText, key string) (string, error)

decrypt (aes_256_cbc) for url safe

func DownloadFile

func DownloadFile(urlStr string, timeout time.Duration, filename string) error

func EncryptString added in v0.2.0

func EncryptString(content, key string) (string, error)

encrypt (aes_256_cbc) for url safe

func FileExists

func FileExists(path string) (isExist bool, isDir bool)

func IP2Long added in v0.2.0

func IP2Long(ipStr string) uint32

func IPInRange added in v0.2.0

func IPInRange(ip net.IP, ipRangeList []string) bool

func MD5

func MD5(txt string) string

func Rand added in v0.2.0

func Rand(min, max int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL