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

package plain

import "github.com/justwatchcom/gopass/pkg/backend/crypto/plain"

Index

Package Files

backend.go loader.go

type Mocker Uses

type Mocker struct{}

Mocker is a no-op GPG mock

func New Uses

func New() *Mocker

New creates a new GPG mock

func (*Mocker) Binary Uses

func (m *Mocker) Binary() string

Binary always returns 'gpg'

func (*Mocker) CreatePrivateKey Uses

func (m *Mocker) CreatePrivateKey(ctx context.Context) error

CreatePrivateKey is not implemented

func (*Mocker) CreatePrivateKeyBatch Uses

func (m *Mocker) CreatePrivateKeyBatch(ctx context.Context, name, email, pw string) error

CreatePrivateKeyBatch is not implemented

func (*Mocker) Decrypt Uses

func (m *Mocker) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)

Decrypt read the file from disk unaltered

func (*Mocker) EmailFromKey Uses

func (m *Mocker) EmailFromKey(context.Context, string) string

EmailFromKey returns nothing

func (*Mocker) Encrypt Uses

func (m *Mocker) Encrypt(ctx context.Context, content []byte, recipients []string) ([]byte, error)

Encrypt writes the input to disk unaltered

func (*Mocker) ExportPublicKey Uses

func (m *Mocker) ExportPublicKey(context.Context, string) ([]byte, error)

ExportPublicKey does nothing

func (*Mocker) Ext Uses

func (m *Mocker) Ext() string

Ext returns gpg

func (*Mocker) FindPrivateKeys Uses

func (m *Mocker) FindPrivateKeys(ctx context.Context, keys ...string) ([]string, error)

FindPrivateKeys does nothing

func (*Mocker) FindPublicKeys Uses

func (m *Mocker) FindPublicKeys(ctx context.Context, keys ...string) ([]string, error)

FindPublicKeys does nothing

func (*Mocker) Fingerprint Uses

func (m *Mocker) Fingerprint(ctx context.Context, id string) string

Fingerprint returns the full-length native fingerprint

func (*Mocker) FormatKey Uses

func (m *Mocker) FormatKey(ctx context.Context, id string) string

FormatKey returns the id

func (*Mocker) IDFile Uses

func (m *Mocker) IDFile() string

IDFile returns .gpg-id

func (*Mocker) ImportPublicKey Uses

func (m *Mocker) ImportPublicKey(context.Context, []byte) error

ImportPublicKey does nothing

func (*Mocker) Initialized Uses

func (m *Mocker) Initialized(context.Context) error

Initialized returns nil

func (*Mocker) ListPrivateKeyIDs Uses

func (m *Mocker) ListPrivateKeyIDs(context.Context) ([]string, error)

ListPrivateKeyIDs does nothing

func (*Mocker) ListPublicKeyIDs Uses

func (m *Mocker) ListPublicKeyIDs(context.Context) ([]string, error)

ListPublicKeyIDs does nothing

func (*Mocker) Name Uses

func (m *Mocker) Name() string

Name returns plain

func (*Mocker) NameFromKey Uses

func (m *Mocker) NameFromKey(context.Context, string) string

NameFromKey returns nothing

func (*Mocker) ReadNamesFromKey Uses

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

ReadNamesFromKey does nothing

func (*Mocker) RecipientIDs Uses

func (m *Mocker) RecipientIDs(context.Context, []byte) ([]string, error)

RecipientIDs does nothing

func (*Mocker) Sign Uses

func (m *Mocker) Sign(ctx context.Context, in string, sigf string) error

Sign writes the hashsum to the given file

func (*Mocker) Verify Uses

func (m *Mocker) Verify(ctx context.Context, sigf string, in string) error

Verify does a pseudo-verification

func (*Mocker) Version Uses

func (m *Mocker) Version(context.Context) semver.Version

Version returns dummy version info

Package plain imports 10 packages (graph). Updated 2019-03-18. Refresh now. Tools for package owners.