keyGen

package
v0.0.0-...-fa0e601 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword(length int) (password string)

GeneratePassword generate a password with given length

func GenerateRSAKey

func GenerateRSAKey(rsaBits int) (privateKey *rsa.PrivateKey)

GenerateRSAKey generate rsa key

func GenerateRSAKeyDER

func GenerateRSAKeyDER(rsaBits int) (derBytes []byte)

GenerateRSAKeyDER generate rsa key

func GenerateRSAKeyEncryptedPEM

func GenerateRSAKeyEncryptedPEM(rsaBits int, password string) (privateKeyPEM *pem.Block)

GenerateRSAKeyEncryptedPEM generate rsa key

func GenerateRSAKeyPEM

func GenerateRSAKeyPEM(rsaBits int) (privateKeyPEM *pem.Block)

GenerateRSAKeyPEM generate rsa key

func MarshalRSAKeyDER

func MarshalRSAKeyDER(privateKey *rsa.PrivateKey) (derBytes []byte)

MarshalRSAKeyDER marshal rsa key

func MarshalRSAKeyEncryptedPEM

func MarshalRSAKeyEncryptedPEM(privateKey *rsa.PrivateKey, password string) (privateKeyPEM *pem.Block)

MarshalRSAKeyEncryptedPEM marshal rsa key

func MarshalRSAKeyPEM

func MarshalRSAKeyPEM(privateKey *rsa.PrivateKey) (privateKeyPEM *pem.Block)

MarshalRSAKeyPEM marshal rsa key

Types

type SSHKeypair

type SSHKeypair struct {
	PrivateKey string
	PublicKey  string
	Password   string
}

SSHKeypair with values as keys and password as strings

func GenerateSSHKey

func GenerateSSHKey(rsaBits int, rsaPasswordLength int) (sshKeypair SSHKeypair)

GenerateSSHKey generate ssh key

Jump to

Keyboard shortcuts

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