gopass: github.com/justwatchcom/gopass/pkg/backend/crypto/gpg/openpgp Index | Files

package openpgp

import "github.com/justwatchcom/gopass/pkg/backend/crypto/gpg/openpgp"

Index

Package Files

gpg.go keyring.go loader.go utils.go

type GPG Uses

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

GPG is a pure-Go GPG backend

func New Uses

func New(ctx context.Context) (*GPG, error)

New creates a new pure-Go GPG backend

func (*GPG) Binary Uses

func (g *GPG) Binary() string

Binary always returns ”

func (*GPG) CreatePrivateKey Uses

func (g *GPG) CreatePrivateKey(ctx context.Context) error

CreatePrivateKey is not implemented

func (*GPG) CreatePrivateKeyBatch Uses

func (g *GPG) CreatePrivateKeyBatch(ctx context.Context, name, email, pw string) error

CreatePrivateKeyBatch is not implemented

func (*GPG) Decrypt Uses

func (g *GPG) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)

Decrypt decryptes the ciphertext see https://gist.github.com/stuart-warren/93750a142d3de4e8fdd2

func (*GPG) DecryptionKeys Uses

func (g *GPG) DecryptionKeys() []openpgp.Key

DecryptionKeys implements openpgp.Keyring

func (*GPG) EmailFromKey Uses

func (g *GPG) EmailFromKey(ctx context.Context, id string) string

EmailFromKey returns the email for this key

func (*GPG) Encrypt Uses

func (g *GPG) Encrypt(ctx context.Context, plaintext []byte, recipients []string) ([]byte, error)

Encrypt encrypts the plaintext for the given recipients

func (*GPG) ExportPublicKey Uses

func (g *GPG) ExportPublicKey(ctx context.Context, id string) ([]byte, error)

ExportPublicKey does nothing

func (*GPG) Ext Uses

func (g *GPG) Ext() string

Ext returns gpg

func (*GPG) FindPrivateKeys Uses

func (g *GPG) FindPrivateKeys(ctx context.Context, keys ...string) ([]string, error)

FindPrivateKeys does nothing

func (*GPG) FindPublicKeys Uses

func (g *GPG) FindPublicKeys(ctx context.Context, keys ...string) ([]string, error)

FindPublicKeys does nothing

func (*GPG) Fingerprint Uses

func (g *GPG) Fingerprint(ctx context.Context, id string) string

Fingerprint returns the full-length native fingerprint

func (*GPG) FormatKey Uses

func (g *GPG) FormatKey(ctx context.Context, id string) string

FormatKey returns the id

func (*GPG) IDFile Uses

func (g *GPG) IDFile() string

IDFile returns .gpg-id

func (*GPG) ImportPublicKey Uses

func (g *GPG) ImportPublicKey(ctx context.Context, buf []byte) error

ImportPublicKey does nothing

func (*GPG) Initialized Uses

func (g *GPG) Initialized(context.Context) error

Initialized returns nil

func (*GPG) KeysById Uses

func (g *GPG) KeysById(id uint64) []openpgp.Key

KeysById implements openpgp.Keyring

func (*GPG) KeysByIdUsage Uses

func (g *GPG) KeysByIdUsage(id uint64, requiredUsage byte) []openpgp.Key

KeysByIdUsage implements openpgp.Keyring

func (*GPG) ListPrivateKeyIDs Uses

func (g *GPG) ListPrivateKeyIDs(context.Context) ([]string, error)

ListPrivateKeyIDs does nothing

func (*GPG) ListPublicKeyIDs Uses

func (g *GPG) ListPublicKeyIDs(context.Context) ([]string, error)

ListPublicKeyIDs does nothing

func (*GPG) Name Uses

func (g *GPG) Name() string

Name returns openpgp

func (*GPG) NameFromKey Uses

func (g *GPG) NameFromKey(ctx context.Context, id string) string

NameFromKey is returns the name for this key

func (*GPG) ReadNamesFromKey Uses

func (g *GPG) ReadNamesFromKey(ctx context.Context, buf []byte) ([]string, error)

ReadNamesFromKey unmarshals and returns the names associated with the given public key

func (*GPG) RecipientIDs Uses

func (g *GPG) RecipientIDs(ctx context.Context, ciphertext []byte) ([]string, error)

RecipientIDs returns the recipients of the encrypted message

func (*GPG) Sign Uses

func (g *GPG) Sign(ctx context.Context, in string, sigf string) error

Sign is not implemented

func (*GPG) SigningKeys Uses

func (g *GPG) SigningKeys() []openpgp.Key

SigningKeys returns a list of signing keys

func (*GPG) Verify Uses

func (g *GPG) Verify(ctx context.Context, sigf string, in string) error

Verify is not implemented

func (*GPG) Version Uses

func (g *GPG) Version(context.Context) semver.Version

Version returns dummy version info

Package openpgp imports 17 packages (graph). Updated 2019-01-23. Refresh now. Tools for package owners.