gpgutil

package
Version: v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: BlueOak-1.0.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptWithKey

func DecryptWithKey(ciphertext string, fingerprint [20]byte) (io.ReadCloser, error)

DecryptWithKey decrypts a ciphertext, and stores into target path, using the provided fingerprint.

func Encrypt

func Encrypt(reader io.Reader, writer io.Writer, receiver *openpgp.Entity) error

Encrypt encrypts stream into an OpenPGP-encrypted stream

func ExportKey

func ExportKey(keyIDs []string) ([]byte, error)

ExportKey exports GPG key in ASCII armor

func GetSecretKeys

func GetSecretKeys(filter string) ([][20]byte, []string, error)

GetSecretKeys retrieves secret keys from GnuPG

func LoadPubKey

func LoadPubKey(reader io.Reader, armor bool) (openpgp.EntityList, error)

LoadPubKey loads public key from a readable stream

func LoadPubKeyFromFile

func LoadPubKeyFromFile(path string, armor bool) (openpgp.EntityList, error)

LoadPubKeyFromFile Loads public key into openpgp's Entity

func PrintKey

func PrintKey(key *openpgp.Entity)

PrintKey prints information about an OpenPGP key entity

func SavePubKey

func SavePubKey(raw io.Writer, key *openpgp.Entity, isArmor bool) error

SavePubKey saves a public keys from an entity to a stream

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL