encryptT

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMd5Config = Md5Config{SaltLen: 10, Iterations: 10, KeyLen: 30}

Functions

func DecryptAES added in v0.0.3

func DecryptAES(key string, data string) string

func DecryptRSA added in v0.0.3

func DecryptRSA(cipherText []byte, buf []byte) string

func EncryptAES added in v0.0.3

func EncryptAES(key string, data string) string

func EncryptRSA added in v0.0.3

func EncryptRSA(plainText string, buf []byte) []byte

func GenerateMd5

func GenerateMd5(psd string) (encodedPsd, salt string)

生成Md5

func GenerateRSAKey added in v0.0.3

func GenerateRSAKey(bits int) ([]byte, []byte)

生成Rsa的公钥和私钥

func HashSha1 added in v0.0.3

func HashSha1(data string) string

func HashSha256 added in v0.0.3

func HashSha256(data string) string

func HashSha512 added in v0.0.3

func HashSha512(data string) string

func VerifyMd5

func VerifyMd5(encodePsd, psd, salt string) bool

验证Md5

Types

type Md5Config

type Md5Config struct {
	SaltLen    int
	Iterations int
	KeyLen     int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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