goaes

package
v1.0.146 Latest Latest
Warning

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

Go to latest
Published: May 16, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PEM_BEGIN = "-----BEGIN RSA PRIVATE KEY-----\n"
	PEM_END   = "\n-----END RSA PRIVATE KEY-----"
)

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(decryptStr string, key []byte, iv string) (string, error)

Decrypt 解密

func Encrypt

func Encrypt(encryptStr string, key []byte, iv string) (string, error)

Encrypt 加密 aes_128_cbc

func FormatPrivateKey added in v1.0.52

func FormatPrivateKey(privateKey string) string

func ParsePrivateKey added in v1.0.52

func ParsePrivateKey(privateKey string) (*rsa.PrivateKey, error)

func RsaSign added in v1.0.52

func RsaSign(signContent string, privateKey string, hash crypto.Hash) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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