utils

package
v0.0.0-...-1ad3171 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AesDecrypt

func AesDecrypt(text, key string) ([]byte, error)

func AesEncrypt

func AesEncrypt(text, key string) (string, error)

func Base64Dncode

func Base64Dncode(src string) string

func Base64Encode

func Base64Encode(src []byte) string

func GetCorpId

func GetCorpId() (corp string, secret string)

get corpid

func GetCorpToken

func GetCorpToken() string

func GetElement

func GetElement(key string, themap map[interface{}]interface{}) string

func GetPubId

func GetPubId() (pubId string, pubSecret string)

func GetPubToken

func GetPubToken() string

func GetXMLConfig

func GetXMLConfig(path string) map[string]string

func GetYamlConfig

func GetYamlConfig(path string) map[interface{}]interface{}

func LCS

func LCS(source, target string) (int, string)

LCS算法

func Log

func Log(v ...interface{})

func MsgSign

func MsgSign(token, timestamp, nonce, encryptedMsg string) (signature string)

func PKCS7Decode

func PKCS7Decode(text []byte) []byte

PKCS7Decode 方法用于删除解密后明文的补位字符

func PKCS7Encode

func PKCS7Encode(text []byte) []byte

PKCS7Encode 方法用于对需要加密的明文进行填充补位

func ReadAesKey

func ReadAesKey() string

get aeskey

func ReadToken

func ReadToken() string

func SendMsgSignature

func SendMsgSignature(token, timestamp, nonce, msg_encrypt string) string

Types

type ConfigElement

type ConfigElement struct {
	Config1  string
	Config2  string
	Config3  string
	Feature1 string
	Feature2 string
	Feature3 string
}

Jump to

Keyboard shortcuts

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