rsa

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2021 License: Apache-2.0 Imports: 9 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 {
	// contains filtered or unexported fields
}

func NewRsaService

func NewRsaService(osExecutor os.OsExecutor) *Service

func (*Service) DecryptPKCS1v15

func (s *Service) DecryptPKCS1v15(rand io.Reader, priv *rsa.PrivateKey, ciphertext []byte) ([]byte, error)

func (*Service) EncryptOAEP added in v0.3.0

func (s *Service) EncryptOAEP(hash hash.Hash, random io.Reader, pub *rsa.PublicKey, msg []byte, label []byte) ([]byte, error)

func (*Service) EncryptPKCS1v15

func (s *Service) EncryptPKCS1v15(rand io.Reader, pub *rsa.PublicKey, msg []byte) ([]byte, error)

func (*Service) ReadPrivateKeyFromBytes added in v0.2.0

func (s *Service) ReadPrivateKeyFromBytes(privateKeyContent []byte) (*rsa.PrivateKey, error)

func (*Service) ReadPrivateKeyFromPath

func (s *Service) ReadPrivateKeyFromPath(privateKeyPath string) (*rsa.PrivateKey, error)

func (*Service) ReadPublicKeyFromBytes added in v0.2.0

func (s *Service) ReadPublicKeyFromBytes(publicKeyContent []byte) (*rsa.PublicKey, error)

func (*Service) ReadPublicKeyFromPath

func (s *Service) ReadPublicKeyFromPath(publicKeyPath string) (*rsa.PublicKey, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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