rsa

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PrivateKey string
	PublicKey  string
)

Functions

func GenerateRSAKey

func GenerateRSAKey(bits int) error

生成RSA私钥和公钥,保存到文件中

func RsaBase64Encode

func RsaBase64Encode(origData string) string

func RsaBase64UrlDecode

func RsaBase64UrlDecode(origData string) ([]byte, error)

func RsaDecrypt

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

解密RSA

func RsaEncrypt

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

加密RSA

Types

This section is empty.

Jump to

Keyboard shortcuts

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