crypt

package
v0.0.0-...-aa8d9c8 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_KEY_SIZE = 4096
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RSA

type RSA struct {
	PublicKey  *rsa.PublicKey
	PrivateKey *rsa.PrivateKey
}

func FromPEM

func FromPEM(pemData []byte) (*RSA, error)

func NewRSA

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

func (*RSA) Decrypt

func (r *RSA) Decrypt(cipher string) ([]byte, error)

func (*RSA) Encrypt

func (r *RSA) Encrypt(message string) ([]byte, error)

func (*RSA) ExportPEM

func (r *RSA) ExportPEM() (pub []byte, priv []byte, err error)

Jump to

Keyboard shortcuts

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