authentication

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodePemToPrivateKey

func DecodePemToPrivateKey(pemBytes []byte) (*rsa.PrivateKey, error)

DecodePemToPrivateKey - Decoded Back PEM ([]Byte) to RSA PrivateKey

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 ..."

func WriteKeyToFile

func WriteKeyToFile(keyBytes []byte, saveFileTo string) error

writePemToFile writes keys to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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