crypto

package
Version: v0.0.0-...-24b4de3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: GPL-2.0-only Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext []byte, priv *rsa.PrivateKey) ([]byte, error)

Decrypt message with rsa private key

func Encrypt

func Encrypt(message []byte, pub *rsa.PublicKey) ([]byte, error)

Encrypt message with rsa private key

func Export

func Export(privateKey *rsa.PrivateKey) []byte

Export rsa private key

func Generate

func Generate(bits int) (*rsa.PrivateKey, error)

Generate rsa private key with bits as param

func Import

func Import(privateKeyPEM []byte) (*rsa.PrivateKey, error)

Import rsa private key

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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