Documentation ¶
Index ¶
- type GPG
- func (g *GPG) Binary() string
- func (g *GPG) CreatePrivateKey(ctx context.Context) error
- func (g *GPG) CreatePrivateKeyBatch(ctx context.Context, name, email, pw string) error
- func (g *GPG) Decrypt(ctx context.Context, ciphertext []byte) ([]byte, error)
- func (g *GPG) DecryptionKeys() []openpgp.Key
- func (g *GPG) EmailFromKey(ctx context.Context, id string) string
- func (g *GPG) Encrypt(ctx context.Context, plaintext []byte, recipients []string) ([]byte, error)
- func (g *GPG) ExportPublicKey(ctx context.Context, id string) ([]byte, error)
- func (g *GPG) Ext() string
- func (g *GPG) FindPrivateKeys(ctx context.Context, keys ...string) ([]string, error)
- func (g *GPG) FindPublicKeys(ctx context.Context, keys ...string) ([]string, error)
- func (g *GPG) Fingerprint(ctx context.Context, id string) string
- func (g *GPG) FormatKey(ctx context.Context, id string) string
- func (g *GPG) IDFile() string
- func (g *GPG) ImportPublicKey(ctx context.Context, buf []byte) error
- func (g *GPG) Initialized(context.Context) error
- func (g *GPG) KeysById(id uint64) []openpgp.Key
- func (g *GPG) KeysByIdUsage(id uint64, requiredUsage byte) []openpgp.Key
- func (g *GPG) ListPrivateKeyIDs(context.Context) ([]string, error)
- func (g *GPG) ListPublicKeyIDs(context.Context) ([]string, error)
- func (g *GPG) Name() string
- func (g *GPG) NameFromKey(ctx context.Context, id string) string
- func (g *GPG) ReadNamesFromKey(ctx context.Context, buf []byte) ([]string, error)
- func (g *GPG) RecipientIDs(ctx context.Context, ciphertext []byte) ([]string, error)
- func (g *GPG) Sign(ctx context.Context, in string, sigf string) error
- func (g *GPG) SigningKeys() []openpgp.Key
- func (g *GPG) Verify(ctx context.Context, sigf string, in string) error
- func (g *GPG) Version(context.Context) semver.Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GPG ¶
type GPG struct {
// contains filtered or unexported fields
}
GPG is a pure-Go GPG backend
func (*GPG) CreatePrivateKey ¶
CreatePrivateKey is not implemented
func (*GPG) CreatePrivateKeyBatch ¶
CreatePrivateKeyBatch is not implemented
func (*GPG) Decrypt ¶
Decrypt decryptes the ciphertext see https://gist.github.com/stuart-warren/93750a142d3de4e8fdd2
func (*GPG) DecryptionKeys ¶
DecryptionKeys implements openpgp.Keyring
func (*GPG) EmailFromKey ¶
EmailFromKey returns the email for this key
func (*GPG) ExportPublicKey ¶
ExportPublicKey does nothing
func (*GPG) FindPrivateKeys ¶
FindPrivateKeys does nothing
func (*GPG) FindPublicKeys ¶
FindPublicKeys does nothing
func (*GPG) Fingerprint ¶
Fingerprint returns the full-length native fingerprint
func (*GPG) ImportPublicKey ¶
ImportPublicKey does nothing
func (*GPG) KeysByIdUsage ¶
KeysByIdUsage implements openpgp.Keyring
func (*GPG) ListPrivateKeyIDs ¶
ListPrivateKeyIDs does nothing
func (*GPG) ListPublicKeyIDs ¶
ListPublicKeyIDs does nothing
func (*GPG) NameFromKey ¶
NameFromKey is returns the name for this key
func (*GPG) ReadNamesFromKey ¶
ReadNamesFromKey unmarshals and returns the names associated with the given public key
func (*GPG) RecipientIDs ¶
RecipientIDs returns the recipients of the encrypted message
func (*GPG) SigningKeys ¶
SigningKeys returns a list of signing keys