rsa

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: 6 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 provides RSA functionality.

func NewService

func NewService() *Service

NewService creates and returns a new Service instance for performing RSA-related operations.

func (*Service) Decrypt

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

Decrypt decrypts data with a private key.

func (*Service) Encrypt

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

Encrypt encrypts data with a public key.

func (*Service) GenerateKeyPair

func (s *Service) GenerateKeyPair(bits int) (publicKey, privateKey []byte, err error)

GenerateKeyPair creates a new RSA key pair.

Jump to

Keyboard shortcuts

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