genppk

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PPK

type PPK struct {
	PrivateFilename string
	PublicFilename  string
	PrivateKey      *rsa.PrivateKey
	PublicKey       *rsa.PublicKey
	PrivatePEM      string
	// contains filtered or unexported fields
}

func (*PPK) ExportPrivateKeyAsPemString

func (p *PPK) ExportPrivateKeyAsPemString() string

func (*PPK) ExportPublicKeyAsPemStr

func (p *PPK) ExportPublicKeyAsPemStr(pubkey *rsa.PublicKey) (string, error)

func (*PPK) ExportPublicKeyAsPemString

func (p *PPK) ExportPublicKeyAsPemString() string

func (*PPK) GenerateKeys

func (p *PPK) GenerateKeys(size int) error

func (*PPK) LoadPrivate

func (p *PPK) LoadPrivate()

func (*PPK) LoadPublic

func (p *PPK) LoadPublic()

func (*PPK) ParsePrivateKeyFromPemStr

func (p *PPK) ParsePrivateKeyFromPemStr(privPEM string) (*rsa.PrivateKey, error)

****************************************

func (*PPK) ParsePublicKeyFromPemStr

func (p *PPK) ParsePublicKeyFromPemStr(pubPEM string) (*rsa.PublicKey, error)

func (*PPK) RSAEncrypt

func (p *PPK) RSAEncrypt(origData []byte) ([]byte, error)

func (*PPK) RsaDecrypt

func (p *PPK) RsaDecrypt(ciphertext []byte) ([]byte, error)

func (*PPK) SavePrivateKeyAsPEM

func (p *PPK) SavePrivateKeyAsPEM()

func (*PPK) SavePublicKey

func (p *PPK) SavePublicKey()

func (*PPK) SavePublicKeyAsPEM

func (p *PPK) SavePublicKeyAsPEM()

func (*PPK) ShowPrivateKey

func (p *PPK) ShowPrivateKey()

type PPKEC

type PPKEC struct {
	PrivateFilename string
	PublicFilename  string
	PrivateKey      *ecdsa.PrivateKey
	PublicKey       *ecdsa.PublicKey
	PrivatePEM      string
	// contains filtered or unexported fields
}

func (*PPKEC) ExportECPrivateKeyAsPemString

func (p *PPKEC) ExportECPrivateKeyAsPemString() string

func (*PPKEC) ExportECPublicKeyAsPemString

func (p *PPKEC) ExportECPublicKeyAsPemString() string

func (*PPKEC) GenerateECKeys

func (p *PPKEC) GenerateECKeys(size int)

func (*PPKEC) LoadPrivate

func (p *PPKEC) LoadPrivate()

func (*PPKEC) LoadPublic

func (p *PPKEC) LoadPublic()

func (*PPKEC) ParsePrivateKeyFromPemStr

func (p *PPKEC) ParsePrivateKeyFromPemStr(privPEM string) (*ecdsa.PrivateKey, error)

****************************************

func (*PPKEC) ParsePublicKeyFromPemStr

func (p *PPKEC) ParsePublicKeyFromPemStr(pubPEM string) (*ecdsa.PublicKey, error)

func (*PPKEC) SavePrivateKeyAsPEM

func (p *PPKEC) SavePrivateKeyAsPEM()

func (*PPKEC) SavePublicKeyAsPEM

func (p *PPKEC) SavePublicKeyAsPEM()

Jump to

Keyboard shortcuts

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