rsautil

package module
v0.0.0-...-0ef7cb3 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rsa

type Rsa struct {
	Private *rsa.PrivateKey
	Public  *rsa.PublicKey
}

Rsa...

func New

func New() *Rsa

New creates a new instance of *Rsa

func (*Rsa) Generate

func (r *Rsa) Generate() error

Generate gerates the public and private keys and sets them

func (*Rsa) ReadPrivateKey

func (r *Rsa) ReadPrivateKey(reader io.Reader) error

ReadPrivateKey takes in the private key bytes and decodes and sets the private and public key

func (*Rsa) ReadPublicKey

func (r *Rsa) ReadPublicKey(reader io.Reader) error

ReadPrivateKey takes in the public key bytes and decodes and sets the public key only

func (Rsa) WritePrivateKey

func (r Rsa) WritePrivateKey(w io.Writer) error

WritePrivateKey encodes the rsa.Private key to the io.Writer

func (Rsa) WritePublicKey

func (r Rsa) WritePublicKey(w io.Writer) error

WritePublicKey encodes the rsa.Private key to the io.Writer

Jump to

Keyboard shortcuts

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