utils

package
v0.0.0-...-58d7c3d Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2017 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AESDecrypt

func AESDecrypt(cipherBytes, key, iv []byte) ([]byte, error)

AESDecrypt AES解密

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

CheckPasswordHash 验证密码

func DecodeWeAppUserInfo

func DecodeWeAppUserInfo(encryptedData string, sessionKey string, iv string) (string, error)

DecodeWeAppUserInfo 解密微信小程序用户信息

func HashPassword

func HashPassword(password string) (string, error)

HashPassword 将密码加密

func PKCS7UnPadding

func PKCS7UnPadding(dst []byte, blockSize int) []byte

PKCS7UnPadding pkcs7填充方式

func SetStructByJSON

func SetStructByJSON(obj interface{}, mapData map[string]interface{}) error

SetStructByJSON 由json对象生成 struct

func StrToIntMonth

func StrToIntMonth(month string) int

StrToIntMonth 字符串月份转整数月份

Types

This section is empty.

Jump to

Keyboard shortcuts

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