encryptT

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 24, 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

func DecryptAES(key string, data string) string

func DecryptRSA

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

func EncryptAES

func EncryptAES(key string, data string) string

func EncryptRSA

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

func GenerateMd5

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

生成Md5

func GenerateRSAKey

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

生成Rsa的公钥和私钥

func HashSha1

func HashSha1(data string) string

func HashSha256

func HashSha256(data string) string

func HashSha512

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