encrypter

package
v0.16.1-beta Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2016 License: Apache-2.0 Imports: 9 Imported by: 75

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrKeyNotValid = errors.New("given key length is invalid. did you set it?")

Functions

func GenerateKey

func GenerateKey() ([]byte, error)

Types

type Encrypter

type Encrypter struct {
	Key []byte
	// contains filtered or unexported fields
}

func New

func New(pub *rsa.PublicKey, priv *rsa.PrivateKey) *Encrypter

func (*Encrypter) Decrypt

func (e *Encrypter) Decrypt(in io.Reader) ([]byte, error)

func (*Encrypter) DecryptKey

func (e *Encrypter) DecryptKey(in []byte) ([]byte, error)

func (*Encrypter) Encrypt

func (e *Encrypter) Encrypt(in io.Reader) ([]byte, error)

func (*Encrypter) EncryptKey

func (e *Encrypter) EncryptKey() ([]byte, error)

Jump to

Keyboard shortcuts

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