Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrKeyGeneration generation error ErrKeyGeneration = errors.New("unable to generate key") // ErrValidation validation error ErrValidation = errors.New("unable to validate key") // ErrPublicKey conversion error ErrPublicKey = errors.New("unable to convert public key") // ErrUnableToWriteFile write error ErrUnableToWriteFile = errors.New("unable to write file") )
Functions ¶
func GenerateSSHKey ¶
GenerateSSHKey generates SSH keypair based on path of the private key The public key would be generated to the same path with ".pub" added
Types ¶
type KeyPair ¶
KeyPair structure
func NewKeyPair ¶
NewKeyPair generates a new SSH keypair This will return a private & public key encoded as DER.
func (*KeyPair) Fingerprint ¶
Fingerprint calculates the fingerprint of the public key
Click to show internal directories.
Click to hide internal directories.