pgp

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2025 License: EUPL-1.2 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct{}

Service is a service for PGP operations.

func NewService

func NewService() *Service

NewService creates a new PGP Service.

func (*Service) Decrypt

func (s *Service) Decrypt(privateKey, ciphertext []byte) ([]byte, error)

Decrypt decrypts data with a private key.

func (*Service) Encrypt

func (s *Service) Encrypt(publicKey, data []byte) ([]byte, error)

Encrypt encrypts data with a public key.

func (*Service) GenerateKeyPair

func (s *Service) GenerateKeyPair(name, email, comment string) (publicKey, privateKey []byte, err error)

GenerateKeyPair generates a new PGP key pair.

func (*Service) Sign

func (s *Service) Sign(privateKey, data []byte) ([]byte, error)

Sign creates a detached signature for a message.

func (*Service) SymmetricallyDecrypt added in v0.0.2

func (s *Service) SymmetricallyDecrypt(passphrase, ciphertext []byte) ([]byte, error)

SymmetricallyDecrypt decrypts data with a passphrase.

func (*Service) SymmetricallyEncrypt

func (s *Service) SymmetricallyEncrypt(passphrase, data []byte) ([]byte, error)

SymmetricallyEncrypt encrypts data with a passphrase.

func (*Service) Verify

func (s *Service) Verify(publicKey, data, signature []byte) error

Verify verifies a detached signature for a message.

Jump to

Keyboard shortcuts

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