rsacrypto

package
v0.0.0-...-d8a4e70 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptData

func DecryptData(privateKey *rsa.PrivateKey, ciphertext string) ([]byte, error)

DecryptData 解密数据

func EncryptData

func EncryptData(publicKey *rsa.PublicKey, data []byte) (string, error)

EncryptData 加密数据

func GenerateKey

func GenerateKey() (*rsa.PrivateKey, error)

GenerateKey 生成RSA密钥对

func PrivateKeyToString

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

PrivateKeyToString 将RSA私钥转换为PEM格式的字符串

func PublicKeyToString

func PublicKeyToString(publicKey *rsa.PublicKey) (string, error)

PublicKeyToString 将RSA公钥转换为PEM格式的字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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