| .. | ||
| README.md | ||
| RFC.md | ||
openpgp
Import: dappco.re/go/core/crypt/crypt/openpgp
Files: 1
Types
Service
type Service struct {
core *framework.Core
}
Service provides OpenPGP cryptographic operations. Usage: use Service with the other exported helpers in this package.
Methods
CreateKeyPair
func (s *Service) CreateKeyPair(name, passphrase string) (string, error)
CreateKeyPair generates a new RSA-4096 PGP keypair. Returns the armored private key string. Usage: call CreateKeyPair(...) during the package's normal workflow.
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. Usage: call DecryptPGP(...) during the package's normal workflow.
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. Usage: call EncryptPGP(...) during the package's normal workflow.
HandleIPCEvents
func (s *Service) HandleIPCEvents(c *framework.Core, msg framework.Message) error
HandleIPCEvents handles PGP-related IPC messages. Usage: call HandleIPCEvents(...) during the package's normal workflow.
Functions
New
func New(c *framework.Core) (any, error)
New creates a new OpenPGP service instance. Usage: call New(...) to create a ready-to-use value.