openpgp

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrypterFromKey

func CrypterFromKey(armoredKey string, loadPassphrase func() (string, bool)) crypto.Crypter

CrypterFromKey creates Crypter from armored key.

func CrypterFromKeyPath

func CrypterFromKeyPath(armoredKeyPath string, loadPassphrase func() (string, bool)) crypto.Crypter

CrypterFromKeyPath creates Crypter from armored key path.

func CrypterFromKeyRingID

func CrypterFromKeyRingID(keyRingID string, loadPassphrase func() (string, bool)) crypto.Crypter

CrypterFromKeyRingID create Crypter from key ring ID.

Types

type Crypter

type Crypter struct {
	KeyRingID      string
	IsUseKeyRingID bool

	ArmoredKey      string
	IsUseArmoredKey bool

	ArmoredKeyPath      string
	IsUseArmoredKeyPath bool

	PubKey    openpgp.EntityList
	SecretKey openpgp.EntityList
	// contains filtered or unexported fields
}

Crypter incapsulates specific of cypher method Includes keys, infrastructure information etc If many encryption methods will be used it worth to extract interface

func (*Crypter) Decrypt

func (crypter *Crypter) Decrypt(reader io.Reader) (io.Reader, error)

Decrypt creates decrypted reader from ordinary reader

func (*Crypter) Encrypt

func (crypter *Crypter) Encrypt(writer io.Writer) (io.WriteCloser, error)

Encrypt creates encryption writer from ordinary writer

Jump to

Keyboard shortcuts

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