openpgp

package
v0.0.4-alpha.39 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: EUPL-1.2 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(c *core.Core) (any, error)

New creates a new OpenPGP service instance.

Types

type Service

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

Service implements the core.Crypt interface using OpenPGP.

func (*Service) CreateKeyPair

func (s *Service) CreateKeyPair(name, passphrase string) (string, error)

CreateKeyPair generates a new RSA-4096 PGP keypair. Returns the armored private key string.

func (*Service) DecryptPGP

func (s *Service) DecryptPGP(privateKey, message, passphrase string, opts ...any) (string, error)

DecryptPGP decrypts a PGP message using the provided armored private key and passphrase.

func (*Service) EncryptPGP

func (s *Service) EncryptPGP(writer goio.Writer, recipientPath, data string, opts ...any) (string, error)

EncryptPGP encrypts data for a recipient identified by their public key (armored string in recipientPath). The encrypted data is written to the provided writer and also returned as an armored string.

func (*Service) HandleIPCEvents

func (s *Service) HandleIPCEvents(c *core.Core, msg core.Message) error

HandleIPCEvents handles PGP-related IPC messages.

Jump to

Keyboard shortcuts

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