rsa

package
v0.2.10 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	BadPrivateKeyErr = errors.New("bad private key")
	InvalidPubKeyErr = errors.New("invalid public key data")
	BadPublicKeyErr  = errors.New("not RSA public key")
)

Functions

This section is empty.

Types

type RSA

type RSA struct {
	// contains filtered or unexported fields
}

func New

func New(pri, pub []byte) *RSA

func (*RSA) Decrypt

func (r *RSA) Decrypt(c []byte) ([]byte, error)

func (*RSA) Encrypt

func (r *RSA) Encrypt(p []byte) ([]byte, error)

func (*RSA) EncryptionType

func (r *RSA) EncryptionType() string

func (*RSA) SetLabel

func (r *RSA) SetLabel(l string) *RSA

Jump to

Keyboard shortcuts

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