rsaV2

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptBytWithPrivateKey

func DecryptBytWithPrivateKey(privateKey []byte, encryptData []byte) ([]byte, error)

func DecryptWithPrivateKey

func DecryptWithPrivateKey(privateKey []byte, encryptData string) ([]byte, error)

DecryptWithPrivateKey 私钥解密

func EncryptBytWithPublicKey

func EncryptBytWithPublicKey(publicKey []byte, bs []byte) ([]byte, error)

EncryptBytWithPublicKey 公钥加密,传入byte 可加密任意长度数据

func EncryptWithPublicKey

func EncryptWithPublicKey(publicKey []byte, bs string) (string, error)

EncryptWithPublicKey 公钥加密

func GenRsaPriPubKey

func GenRsaPriPubKey(bits int) ([]byte, []byte, error)

GenRsaPriPubKey 生成公钥私钥

func GenRsaPrivateKey

func GenRsaPrivateKey(bits int) (*rsa.PrivateKey, []byte, error)

GenRsaPrivateKey 生成私钥

func GenRsaPublicKey

func GenRsaPublicKey(privateKey []byte) ([]byte, error)

GenRsaPublicKey 获取公钥

Types

This section is empty.

Jump to

Keyboard shortcuts

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