utils

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CSRToPEM added in v0.1.4

func CSRToPEM(cert []byte) []byte

CSRToPEM encodes CSR to PEM format

func CertFromFile added in v0.1.7

func CertFromFile(certFilePath string) (*x509.Certificate, error)

func CertToPEM

func CertToPEM(cert []byte) []byte

CertToPEM encodes Certificate to PEM format

func GeneratePrivateKey

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

GeneratePrivateKey creates an RSA Private Key with provided bit size

func GenerateSSHPublicKey added in v0.1.5

func GenerateSSHPublicKey(rsaPubKey *rsa.PublicKey) ([]byte, error)

GenerateSSHPublicKey take an rsa.PublicKey and return bytes suitable for writing to .pub file in the format "ssh-rsa ..."

func PrivateKeyFromPEMFile

func PrivateKeyFromPEMFile(keyFilePath string) (*rsa.PrivateKey, error)

func PrivateKeyToPEM

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

PrivateKeyToPEM encodes Private Key to PEM format

func PublicKeyToPEM added in v0.1.4

func PublicKeyToPEM(publicKey *rsa.PublicKey) []byte

PublicKeyToPEM encodes Public Key to PEM format

func ReadInputs added in v0.1.2

func ReadInputs(questions []string, reader io.Reader) ([]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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