Documentation
¶
Index ¶
Constants ¶
View Source
const ( DefaultBitSize = 4096 DefaultPrivateKeyPath = "id_rsa" DefaultPublicKeyPath = "id_rsa.pub" )
Variables ¶
View Source
var (
ErrNoSSHKeyDefined = errors.New("no ssh key configured")
)
Functions ¶
func GenerateED25519Key ¶
func MarshalED25519PrivateKey ¶
func MarshalED25519PrivateKey(key ed25519.PrivateKey) []byte
Types ¶
type Options ¶
type Options struct {
BitSize int `json:"bit_size"`
PriKeyPath string `json:"pri_key_path"`
PubKeyPath string `json:"pub_key_path"`
}
SSHKey is a struct that holds the options when creating a new ssh key
func (*Options) SetDefaults ¶
func (o *Options) SetDefaults()
SetDefaults sets the default values for the options
type SshKey ¶
type SshKey struct {
PrivKey *rsa.PrivateKey
Priv []byte
Pub []byte
// contains filtered or unexported fields
}
func (*SshKey) SaveToFile ¶
Click to show internal directories.
Click to hide internal directories.