rsa

package
v0.0.0-...-89bd919 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRsaKey

func GenRsaKey(publicKeyPath, privateKeyPath string, bits int) error

GenRsaKey 生成rsa公钥以及私钥 @params publicKeyPath 公钥地址 @params privateKeyPath 私钥地址 @params bits 密钥长rsa_test.go度

func RsaDecrypt

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

RsaDecrypt rsa解密 需要对传入的数据进行base64解码 @params privateKeyPath 私钥文件位置 @params ciphertext 需要解密的数据

func RsaEncrypt

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

RsaEncrypt rsa加密 @params publicKeyPath 公钥文件位置 @params origData 需要加密的数据 @return 返回的数据是经过base64编码的

Types

This section is empty.

Jump to

Keyboard shortcuts

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