gpg

package
v0.0.0-...-1c54bb3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(w io.Writer, h textproto.Header, rcpts []string, from string) (io.WriteCloser, error)

func Sign

func Sign(w io.Writer, h textproto.Header, from string) (io.WriteCloser, error)

Types

type EncrypterSigner

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

func (*EncrypterSigner) Close

func (es *EncrypterSigner) Close() (err error)

func (*EncrypterSigner) Write

func (es *EncrypterSigner) Write(p []byte) (int, error)

type Mail

type Mail struct{}

Mail satisfies the PGPProvider interface in aerc

func (*Mail) Close

func (m *Mail) Close()

func (*Mail) Decrypt

func (m *Mail) Decrypt(r io.Reader, decryptKeys openpgp.PromptFunction) (*models.MessageDetails, error)

func (*Mail) Encrypt

func (m *Mail) Encrypt(buf *bytes.Buffer, rcpts []string, signer string, decryptKeys openpgp.PromptFunction, header *mail.Header) (io.WriteCloser, error)

func (*Mail) ExportKey

func (m *Mail) ExportKey(k string) (io.Reader, error)

func (*Mail) GetKeyId

func (m *Mail) GetKeyId(s string) (string, error)

func (*Mail) GetSignerKeyId

func (m *Mail) GetSignerKeyId(s string) (string, error)

func (*Mail) ImportKeys

func (m *Mail) ImportKeys(r io.Reader) error

func (*Mail) Init

func (m *Mail) Init() error

func (*Mail) Sign

func (m *Mail) Sign(buf *bytes.Buffer, signer string, decryptKeys openpgp.PromptFunction, header *mail.Header) (io.WriteCloser, error)

type Reader

type Reader struct {
	Header         textproto.Header
	MessageDetails *models.MessageDetails
}

func NewReader

func NewReader(h textproto.Header, body io.Reader) (*Reader, error)

func Read

func Read(r io.Reader) (*Reader, error)

type Signer

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

func (*Signer) Close

func (s *Signer) Close() (err error)

func (*Signer) Write

func (s *Signer) Write(p []byte) (int, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL