encryptUtil

package
v0.0.46 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AESIVKey = []byte("12345678901234567890123456789012") // 256位密钥
)

Functions

func DecryptAES

func DecryptAES(key []byte, ct string) (string, error)

func DecryptRSA

func DecryptRSA(encrypted []byte, privateKey *rsa.PrivateKey) []byte

func EncryptAES

func EncryptAES(key []byte, plaintext string) (string, error)

func EncryptRSA

func EncryptRSA(txt string) ([]byte, *rsa.PublicKey, *rsa.PrivateKey)

func Md5

func Md5(txt string) string

func SaveRSAPrivateKey

func SaveRSAPrivateKey(private *rsa.PrivateKey)

func SaveRSAPublicKey

func SaveRSAPublicKey(public *rsa.PublicKey)

func Sha2

func Sha2(txt string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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