rsa

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeRSAPrivateKey = "RSA PRIVATE KEY"

	DefaultBitsSize = 4096
)

Variables

View Source
var (
	ErrFailedToParsePEMBlock = errors.New("failed to parse PEM block containing the public key")
)

All kind of errors

Functions

This section is empty.

Types

type RSA

type RSA struct {
	// contains filtered or unexported fields
}

func FromPrivateKey

func FromPrivateKey(b []byte) (*RSA, error)

func NewRSA

func NewRSA(bits int) (*RSA, error)

func (*RSA) Decrypt

func (a *RSA) Decrypt(data []byte) ([]byte, error)

func (*RSA) Encrypt

func (a *RSA) Encrypt(data []byte) ([]byte, error)

func (*RSA) FromBinary

func (a *RSA) FromBinary(raw []byte) (localCipher.Cipher, error)

func (*RSA) Kind

func (a *RSA) Kind() string

func (*RSA) ToBinary

func (a *RSA) ToBinary() ([]byte, error)

Jump to

Keyboard shortcuts

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