ecc

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RSA_DecodeJSEncrypt

func RSA_DecodeJSEncrypt(data string, privatePemPath string) string

RSA_DecodeJSEncrypt 用于用户名、密码解密

func RSA_Decrypt

func RSA_Decrypt(src []byte, privateKey *rsa.PrivateKey) ([]byte, error)

rsa私匙解密

func RSA_DecryptByPem

func RSA_DecryptByPem(src []byte, file string) ([]byte, error)

func RSA_Encrypt

func RSA_Encrypt(src []byte, publickey *rsa.PublicKey) ([]byte, error)

rsa公匙加密

func RSA_GenKeys

func RSA_GenKeys(bits int) (privateKey *rsa.PrivateKey, publicKey *rsa.PublicKey, err error)

func RSA_GenPemFiles

func RSA_GenPemFiles(dir string, bits int) error

RSA_GenPemFiles

func RSA_GenPems

func RSA_GenPems(privateKeyWriter, publicKeyWriter io.Writer, bits int) error

RSA_GenPems 产生公钥私钥对应的pem文件

func RSA_PrivateKeyFromFile

func RSA_PrivateKeyFromFile(file string) (*rsa.PrivateKey, error)

解析私匙

func RSA_PublicKeyFromFile

func RSA_PublicKeyFromFile(file string) (*rsa.PublicKey, error)

解析公匙

Types

This section is empty.

Jump to

Keyboard shortcuts

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