go-crypt/specs/crypt/rsa
2026-03-27 21:45:33 +00:00
..
README.md docs: populate package specs 2026-03-27 19:30:16 +00:00
RFC.md Add RFC specs for auth crypt and trust packages 2026-03-27 21:45:33 +00:00

rsa

Import: dappco.re/go/core/crypt/crypt/rsa

Files: 1

Types

Service

type Service struct{}

Service provides RSA functionality. Usage: use Service with the other exported helpers in this package.

Methods

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

Decrypt decrypts data with a private key. Usage: call Decrypt(...) during the package's normal workflow.

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

Encrypt encrypts data with a public key. Usage: call Encrypt(...) during the package's normal workflow.

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

GenerateKeyPair creates a new RSA key pair. Usage: call GenerateKeyPair(...) during the package's normal workflow.

Functions

NewService

func NewService() *Service

NewService creates and returns a new Service instance for performing RSA-related operations. Usage: call NewService(...) to create a ready-to-use value.