rsa

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(cipher []byte, privateKey *rsa.PrivateKey) ([]byte, error)

Decrypt RSA私钥解密

func DefaultDecrypt

func DefaultDecrypt(cipher []byte) ([]byte, error)

func DefaultEncrypt

func DefaultEncrypt(plaintext []byte) ([]byte, error)

func Encrypt

func Encrypt(plaintext []byte, publicKey *rsa.PublicKey) ([]byte, error)

Encrypt RSA公钥加密

func GenRsaKey

func GenRsaKey(path string, bitNum int)

func ReadPrivateKey

func ReadPrivateKey(path string) (*rsa.PrivateKey, error)

func ReadPublicKey

func ReadPublicKey(path 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