Documentation ¶
Overview ¶
Package xc implements a modern crypto backend for gopass. TODO(2.x) DEPRECATED and slated for removal in the 2.0.0 release.
Index ¶
- Constants
- type XC
- func (x *XC) Decrypt(ctx context.Context, buf []byte) ([]byte, error)
- func (x *XC) DecryptStream(ctx context.Context, ciphertext io.Reader, plaintext io.Writer) error
- func (x *XC) Encrypt(ctx context.Context, plaintext []byte, recipients []string) ([]byte, error)
- func (x *XC) EncryptStream(ctx context.Context, plaintext io.Reader, recipients []string, ...) error
- func (x *XC) ExportPrivateKey(id string) ([]byte, error)
- func (x *XC) ExportPublicKey(ctx context.Context, id string) ([]byte, error)
- func (x *XC) Ext() string
- func (x *XC) FindIdentities(ctx context.Context, search ...string) ([]string, error)
- func (x *XC) FindRecipients(ctx context.Context, search ...string) ([]string, error)
- func (x *XC) Fingerprint(ctx context.Context, id string) string
- func (x *XC) FormatKey(ctx context.Context, id, tpl string) string
- func (x *XC) GenerateIdentity(ctx context.Context, name, email, passphrase string) error
- func (x *XC) IDFile() string
- func (x *XC) ImportPrivateKey(buf []byte) error
- func (x *XC) ImportPublicKey(ctx context.Context, buf []byte) error
- func (x *XC) Initialized(ctx context.Context) error
- func (x *XC) ListIdentities(ctx context.Context) ([]string, error)
- func (x *XC) ListRecipients(ctx context.Context) ([]string, error)
- func (x *XC) Name() string
- func (x *XC) ReadNamesFromKey(ctx context.Context, buf []byte) ([]string, error)
- func (x *XC) RecipientIDs(ctx context.Context, ciphertext []byte) ([]string, error)
- func (x *XC) RemoveKey(id string) error
- func (x *XC) Version(ctx context.Context) semver.Version
Constants ¶
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
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type XC ¶
type XC struct {
// contains filtered or unexported fields
}
XC is an experimental crypto backend
func (*XC) DecryptStream ¶
DecryptStream decrypts an stream encrypted with EncryptStream
func (*XC) Encrypt ¶
Encrypt encrypts the given plaintext for all the given recipients and returns the ciphertext
func (*XC) EncryptStream ¶
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 ¶
ExportPrivateKey exports a given private key
func (*XC) ExportPublicKey ¶
ExportPublicKey exports a given public key
func (*XC) FindIdentities ¶
FindIdentities finds all matching private keys
func (*XC) FindRecipients ¶
FindRecipients finds all matching public keys
func (*XC) Fingerprint ¶
Fingerprint returns the id
func (*XC) GenerateIdentity ¶
GenerateIdentity creates a new keypair
func (*XC) ImportPrivateKey ¶
ImportPrivateKey imports a given private key into the keyring
func (*XC) ImportPublicKey ¶
ImportPublicKey imports a given public key into the keyring
func (*XC) Initialized ¶
Initialized returns an error if this backend is not properly initialized
func (*XC) ListIdentities ¶
ListIdentities lists all private key IDs
func (*XC) ListRecipients ¶
ListRecipients lists all public key IDs
func (*XC) ReadNamesFromKey ¶
ReadNamesFromKey unmarshals the given public key and returns the identities name
func (*XC) RecipientIDs ¶
RecipientIDs reads the header of the given file and extracts the recipients IDs