gnupg

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrypterHandle

type CrypterHandle struct {
	GPGCmd string // "gpg2" or "gpg"
	// contains filtered or unexported fields
}

CrypterHandle is the handle

func (CrypterHandle) AddNewKey

func (crypt CrypterHandle) AddNewKey(keyname, repobasedir, sourcedir, destdir string) ([]string, error)

AddNewKey extracts keyname from sourcedir's GnuPG chain to destdir keychain. It returns a list of files that may have changed.

func (CrypterHandle) Cat

func (crypt CrypterHandle) Cat(filename string) ([]byte, error)

Cat returns the plaintext or, if it is missing, the decrypted cyphertext.

func (CrypterHandle) Decrypt

func (crypt CrypterHandle) Decrypt(filename string, umask int, overwrite bool) error

Decrypt name+".gpg", possibly overwriting name.

func (CrypterHandle) Encrypt

func (crypt CrypterHandle) Encrypt(filename string, umask int, receivers []string) (string, error)

Encrypt name, overwriting name+".gpg"

func (CrypterHandle) Name

func (crypt CrypterHandle) Name() string

Name returns my name.

Jump to

Keyboard shortcuts

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