pgpencrypt

package
v0.0.0-...-b5a46b0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 8 Imported by: 0

README

pgpencrypt: a convenience wrapper on top of golang.org/x/crypto/openpgp, providing an easy way to encrypt data to a GPG/PGP key

Documentation

Index

Constants

View Source
const (
	Armored = Armoring(true)
	Binary  = Armoring(false)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Armoring

type Armoring bool

type Config

type Config struct {
	KeyringURLs      []string
	KeyringFilenames []string
	Recipients       []string
}

type Encrypter

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

func FromConfig

func FromConfig(cfg *Config) (*Encrypter, error)

func (*Encrypter) Encrypt

func (e *Encrypter) Encrypt(data []byte) ([]byte, error)

type Keyring

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

func (*Keyring) AddFromFile

func (k *Keyring) AddFromFile(filename string) error

func (*Keyring) AddFromURL

func (k *Keyring) AddFromURL(url string) error

func (*Keyring) EncrypterTo

func (k *Keyring) EncrypterTo(recipients []string) (*Encrypter, error)

Jump to

Keyboard shortcuts

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