gopass: Index | Files | Directories

package xc

import ""


Package Files

compress.go decrypt.go encrypt.go export.go import.go loader.go stream.go utils.go xc.go


const (

    // Ext is the extension used by this backend
    Ext = "xc"
    // IDFile is the recipients list used by this backend
    IDFile = ".xc-ids"
const (
    // OnDiskVersion is the version of our on-disk format
    OnDiskVersion = 1

type XC Uses

type XC struct {
    // contains filtered or unexported fields

XC is an experimental crypto backend

func New Uses

func New(dir string, client agentClient) (*XC, error)

New creates a new XC backend

func (*XC) CreatePrivateKey Uses

func (x *XC) CreatePrivateKey(ctx context.Context) error

CreatePrivateKey is not implemented

func (*XC) CreatePrivateKeyBatch Uses

func (x *XC) CreatePrivateKeyBatch(ctx context.Context, name, email, passphrase string) error

CreatePrivateKeyBatch creates a new keypair

func (*XC) Decrypt Uses

func (x *XC) Decrypt(ctx context.Context, buf []byte) ([]byte, error)

Decrypt tries to decrypt the given ciphertext and returns the plaintext

func (*XC) DecryptStream Uses

func (x *XC) DecryptStream(ctx context.Context, ciphertext io.Reader, plaintext io.Writer) error

DecryptStream decrypts an stream encrypted with EncryptStream

func (*XC) EmailFromKey Uses

func (x *XC) EmailFromKey(ctx context.Context, id string) string

EmailFromKey extracts the email from a key

func (*XC) Encrypt Uses

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

Encrypt encrypts the given plaintext for all the given recipients and returns the ciphertext

func (*XC) EncryptStream Uses

func (x *XC) EncryptStream(ctx context.Context, plaintext io.Reader, recipients []string, ciphertext io.Writer) error

EncryptStream encrypts the plaintext using a slightly modified on disk-format suitable for streaming

func (*XC) ExportPrivateKey Uses

func (x *XC) ExportPrivateKey(ctx context.Context, id string) ([]byte, error)

ExportPrivateKey exports a given private key

func (*XC) ExportPublicKey Uses

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

ExportPublicKey exports a given public key

func (*XC) Ext Uses

func (x *XC) Ext() string

Ext returns xc

func (*XC) FindPrivateKeys Uses

func (x *XC) FindPrivateKeys(ctx context.Context, search ...string) ([]string, error)

FindPrivateKeys finds all matching private keys

func (*XC) FindPublicKeys Uses

func (x *XC) FindPublicKeys(ctx context.Context, search ...string) ([]string, error)

FindPublicKeys finds all matching public keys

func (*XC) Fingerprint Uses

func (x *XC) Fingerprint(ctx context.Context, id string) string

Fingerprint returns the full-length native fingerprint

func (*XC) FormatKey Uses

func (x *XC) FormatKey(ctx context.Context, id string) string

FormatKey formats a key

func (*XC) IDFile Uses

func (x *XC) IDFile() string

IDFile returns .xc-ids

func (*XC) ImportPrivateKey Uses

func (x *XC) ImportPrivateKey(ctx context.Context, buf []byte) error

ImportPrivateKey imports a given private key into the keyring

func (*XC) ImportPublicKey Uses

func (x *XC) ImportPublicKey(ctx context.Context, buf []byte) error

ImportPublicKey imports a given public key into the keyring

func (*XC) Initialized Uses

func (x *XC) Initialized(ctx context.Context) error

Initialized returns an error if this backend is not properly initialized

func (*XC) ListPrivateKeyIDs Uses

func (x *XC) ListPrivateKeyIDs(ctx context.Context) ([]string, error)

ListPrivateKeyIDs lists all private key IDs

func (*XC) ListPublicKeyIDs Uses

func (x *XC) ListPublicKeyIDs(ctx context.Context) ([]string, error)

ListPublicKeyIDs lists all public key IDs

func (*XC) Name Uses

func (x *XC) Name() string

Name returns xc

func (*XC) NameFromKey Uses

func (x *XC) NameFromKey(ctx context.Context, id string) string

NameFromKey extracts the name from a key

func (*XC) ReadNamesFromKey Uses

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

ReadNamesFromKey unmarshals the given public key and returns the identities name

func (*XC) RecipientIDs Uses

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

RecipientIDs reads the header of the given file and extracts the recipients IDs

func (*XC) RemoveKey Uses

func (x *XC) RemoveKey(id string) error

RemoveKey removes a single key from the keyring

func (*XC) Version Uses

func (x *XC) Version(ctx context.Context) semver.Version

Version returns 0.0.1


xcpbPackage xcpb is a generated protocol buffer package.

Package xc imports 23 packages (graph). Updated 2019-02-19. Refresh now. Tools for package owners.