encrypt

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RAND_NUM   = 0 // 纯数字
	RAND_LOWER = 1 // 小写字母
	RAND_UPPER = 2 // 大写字母
	RAND_ALL   = 3 // 数字、大小写字母
)

Variables

This section is empty.

Functions

func GenRandCode added in v1.0.3

func GenRandCode(inviteCodeLen int, targetKind int) string

生成随机码

func MD5

func MD5(data []byte) string

生成32位md5字串[小写]

func RandNum added in v1.0.6

func RandNum(start, end int) int

生成[start,end)随机数

func RsaDecrypt

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

解密

func RsaEncrypt

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

加密

Types

This section is empty.

Jump to

Keyboard shortcuts

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