README

util

go工具包

Expand ▾ Collapse ▴

Documentation

Overview

des_help

rsa_help

Index

Constants

View Source
const RemoteUlr = "https://oapi.dingtalk.com/robot/send?access_token=7d517a7780c830b7007464759910cc5643bdcfb682e30232f6f9260ba9b0bc0f"

Variables

View Source
var DefaultHttpClient *http.Client
View Source
var DefaultMediaHttpClient *http.Client

Functions

func ArrayMd5

func ArrayMd5(array []string) string

数组的排序后的MD5值

func ArraySha1

func ArraySha1(array []string) string

数组的排序后的哈希值

func DecodeJsonhttpResponse

func DecodeJsonhttpResponse(r io.Reader, v interface{}) error

func DesDecrypt

func DesDecrypt(crypted, key []byte) ([]byte, error)

func DesEncrypt

func DesEncrypt(origData, key []byte) ([]byte, error)

func DesWithKeyandIv

func DesWithKeyandIv(data, key, iv []byte) ([]byte, error)

func Des_Decypt

func Des_Decypt(data, key, iv []byte) ([]byte, error)

func Des_DecyptWithBase64

func Des_DecyptWithBase64(data, key, iv []byte) ([]byte, error)

func Des_Encrypt

func Des_Encrypt(data, key, iv []byte) ([]byte, error)

func Des_EncryptWithBase64

func Des_EncryptWithBase64(data, key []byte) (string, error)

func GetIp

func GetIp(condition string) string

GetIp 获取ip地址

func Id5Decode

func Id5Decode(source string) (string, error)

func Id5Encode

func Id5Encode(source string) (string, error)

func InfoToSign

func InfoToSign(a *GetSignInfo) string

func Md5

func Md5(text string) string

return md5 str

func NewSchoolSign

func NewSchoolSign(college, degree, enyear, name, idcode, key string) string

func NewSign

func NewSign(name, idcode, key string) string

func NewToken

func NewToken(username, pwd string, t time.Time) string

func PKCS5Padding

func PKCS5Padding(ciphertext []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(origData []byte) []byte

func RsaDecrypt

func RsaDecrypt(ciphertext, privateKey []byte) ([]byte, error)

func RsaDecryptWithPrivateKey

func RsaDecryptWithPrivateKey(ciphertext, privateKey []byte) (result []byte, err error)

func RsaEncrypt

func RsaEncrypt(origData, publicKey []byte) ([]byte, error)

func RsaEncryptWithPublickKey

func RsaEncryptWithPublickKey(originalData, publickey []byte) (result []byte, err error)

func RsaSignWithPrivateKey

func RsaSignWithPrivateKey(origData, private []byte) ([]byte, error)

func RsaSignWithPrivateKeyUseBase64

func RsaSignWithPrivateKeyUseBase64(origData, private []byte) ([]byte, error)

func SaltPwd

func SaltPwd(pwd string) string

加密

func SendAlarm

func SendAlarm(title, text string) error

func SetSalt

func SetSalt(s string)

func Sha1

func Sha1(data string) string

return sha1 str

func Sha1_new

func Sha1_new(data string) string

func Sub_suffix

func Sub_suffix(s string, N int) string

Types

type AlarmMessage

type AlarmMessage struct {
	MessageType string `json:"msgtype"`
	MarkDown    struct {
		Title string `json:"title"`
		Text  string `json:"text"`
	} `json:"markdown"`
}

type GetSignInfo

type GetSignInfo struct {
	Args_1 string
	Args_2 string
	Args_3 string
	Args_4 string
	Date   time.Time
}

Directories

Path Synopsis
config
file
idcode_helper
influx
mysort merge sort package
oil
pushmsg
random
sms
status