gpg

package
v0.0.0-...-1c2fe5b Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPG

type GPG struct {
	GPG        string
	Passphrase string // For testing.
}

GPG is a gpg handle.

func New

func New(gpg string) *GPG

New creates a new GPG.

func (*GPG) Decrypt

func (gpg *GPG) Decrypt(ctx context.Context, dec string) (string, *Status, error)

Decrypt decrypts a message.

func (*GPG) Verify

func (gpg *GPG) Verify(ctx context.Context, data, sig string) (*Status, error)

Verify verifies a message.

func (*GPG) VerifyInline

func (gpg *GPG) VerifyInline(ctx context.Context, data string) (*Status, error)

VerifyInline verifies non-detached signatures.

type Status

type Status struct {
	Signed        string
	Encrypted     []string
	GoodSignature bool
	Warnings      []string
}

Status contains success or fail of a GPG operation.

Jump to

Keyboard shortcuts

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