rsa

package
v1.2.79 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Demo

func Demo()

func FileGet

func FileGet(path string) []byte

func GenerateRSAKey

func GenerateRSAKey(bits int, path string)

GenerateRSAKey 生成RSA私钥和公钥,保存到文件中 bits 证书大小

func MarshalPKCS8PrivateKey

func MarshalPKCS8PrivateKey(key *rsa.PrivateKey) []byte

func RSA_Decrypt

func RSA_Decrypt(cipherText []byte, buf []byte) []byte

RSA_Decrypt RSA解密 cipherText 需要解密的byte数据 path 私钥文件路径

func RSA_Encrypt

func RSA_Encrypt(plainText []byte, buf []byte) []byte

RSA_Encrypt RSA加密 plainText 要加密的数据 path 公钥匙文件地址

Types

This section is empty.

Jump to

Keyboard shortcuts

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