Documentation
¶
Index ¶
- func AesDecrypt(data []byte, key []byte, keyLen int) ([]byte, error)
- func AesDecryptBase64(data string, key []byte, keyLen int) ([]byte, error)
- func AesDecryptCBC(data string, key []byte, kenLen int) (decrypted []byte)
- func AesDecryptCFB(encrypted []byte, key []byte, kenLen int) (decrypted []byte)
- func AesDecryptECB(encrypted []byte, key []byte) (decrypted []byte)
- func AesEncrypt(data []byte, key []byte, keyLen int) ([]byte, error)
- func AesEncryptBase64(data []byte, key []byte, keyLen int) (string, error)
- func AesEncryptCBC(origData []byte, key []byte, kenLen int) (result string)
- func AesEncryptCFB(origData []byte, key []byte, kenLen int) (encrypted []byte)
- func AesEncryptECB(origData []byte, key []byte) (encrypted []byte)
- func CheckApkAudit(inputFile string) (filetype string, err error)
- func CheckDirExists(pathDir string) bool
- func CheckDocAudit(inputFile string) (filetype string, err error)
- func CheckExists(pathDir string) bool
- func CheckFileExists(pathDir string) bool
- func CheckImageAudit(inputFile string) (filetype string, rr error)
- func CheckIp(ip string) bool
- func CheckNumber(s string) bool
- func CheckTsAudit(inputFile string) (err error)
- func CheckVideoAudit(inputFile string) (fileType string, err error)
- func CheckZipAudit(inputFile string) (filetype string, err error)
- func CopyFile(src, dst string) (n int64, err error)
- func Download(url, filepath string) error
- func GenerateSelfSignedCert() (certPem []byte, keyPem []byte, err error)
- func Get(_url string, _time int) (result []byte, err error)
- func GetAnyString(value interface{}) string
- func GetFileMd5(filePath string) string
- func GetFileSize(filePath string) int64
- func GetFormatBytes(total uint64) string
- func GetLocalIP() (ip string, err error)
- func GetMd5(m string) string
- func GetNow() string
- func GetNowDateFormat(layout string) string
- func GetNowFormatToUnix(date string) int64
- func GetNowTimeFormatUnix(date, layout string) int64
- func GetNowTimeUnix(unix int64, layout string) string
- func GetPath() string
- func GetRandDateUUID(lenth int) string
- func GetRandUUID(length int) string
- func GetTlsConfig() (tlsConfig *tls.Config, err error)
- func GetTlsVersionToString(version uint16) string
- func Json(_url string, param interface{}, _times int) (result []byte, err error)
- func Mkdir(dir string) (e error)
- func Post(_url string, param map[string]interface{}, _times int) (result []byte, err error)
- func RunCommand(cmd string) (string, error)
- func TrimAllSpace(str string) string
- type ManifestEncoder
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶
AesDecrypt 解密 CBC模式 data:加密的数据, key:秘钥,keyLen:加密长度,一般是16,32,48,56,64等
func AesDecryptBase64 ¶
DecryptByAes base64解码后 Aes 解密
func AesDecryptCBC ¶
cbc解密
func AesDecryptCFB ¶
解密数据,CFB模式需要初始化向量iv,长度和秘钥长度一致。
func AesDecryptECB ¶
func AesEncrypt ¶
AesEncrypt 加密,CBC模式 ,data:加密前的数据, key:秘钥,keyLen:加密长度,一般是16,32,48,56,64等
func AesEncryptBase64 ¶
EncryptByAes Aes加密 后 base64
func AesEncryptCBC ¶
=================== CBC ====================== cbc加密,origData:需要加密的字符,key:秘钥
func AesEncryptCFB ¶
=================== CFB ====================== 加密数据,CFB模式需要初始化向量iv,长度和秘钥长度一致。
func AesEncryptECB ¶
=================== ECB ======================
func CheckImageAudit ¶
判断文件是否图片类型
func CheckVideoAudit ¶
判断文件是否为视频文件类型
func GenerateSelfSignedCert ¶
自己生成证书,
func GetNowDateFormat ¶
根据时间格式返回,layout 时间格式,2006-01-02 15:04:05
func GetNowFormatToUnix ¶
把时间日期转换为时间差(秒) date 2006-01-02 15:04:05
func GetNowTimeUnix ¶
把时间戳(秒)转换为日期格式 unix 时间戳(秒),layout 时间格式,2006-01-02 15:04:05
func GetRandDateUUID ¶
根据时间生成随机字符串,一般是前面时间yyyyMMddHHmmss后面的随机字符串长度为lenth
func GetTlsConfig ¶
生成证书的TLS配置
tlsConfig, _ := internal.GetTlsConfig()
server := &http.Server{
Addr: bindAddress,
Handler: r,
TLSConfig: tlsConfig,
}
err = server.ListenAndServeTLS("", "")
func TrimAllSpace ¶
删除所有的空格字符串,包含空格、制表符、换行等。 strings.TrimSpace(str) 删除左右空格
Types ¶
type ManifestEncoder ¶
得到apk的基本信息
func (*ManifestEncoder) EncodeToken ¶
func (e *ManifestEncoder) EncodeToken(t xml.Token) error
func (*ManifestEncoder) Flush ¶
func (e *ManifestEncoder) Flush() error
func (*ManifestEncoder) OpenApk ¶
func (ths *ManifestEncoder) OpenApk(filePath string) error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package apkparser parses AndroidManifest.xml and resources.arsc from Android APKs.
|
Package apkparser parses AndroidManifest.xml and resources.arsc from Android APKs. |
|
flate
Package flate implements the DEFLATE compressed data format, described in RFC 1951.
|
Package flate implements the DEFLATE compressed data format, described in RFC 1951. |