pkey

package
v0.0.0-...-0abe8d6 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePrivateKeyToPEM

func EncodePrivateKeyToPEM(privateKey *rsa.PrivateKey) []byte

EncodePrivateKeyToPEM encodes Private Key from RSA to PEM format

func GeneratePrivateKey

func GeneratePrivateKey(bitSize int) (*rsa.PrivateKey, error)

GeneratePrivateKey creates a RSA Private Key of specified byte size

func GeneratePublicKey

func GeneratePublicKey(privatekey *rsa.PublicKey) ([]byte, error)

GeneratePublicKey take a rsa.PublicKey and return bytes suitable for writing to .pub file returns in the format "ssh-rsa ..."

Types

type Pkey

type Pkey struct {
	PrivateKey string `json:"private_key"`
	PublicKey  string `json:"public_key"`
}

Pkey .

Jump to

Keyboard shortcuts

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