Documentation ¶
Index ¶
- func AlgorithmDefaultKeyLength(algo Algorithm) int32
- func AlgorithmToString(algo Algorithm) string
- func GenerateKeyPair(algo Algorithm, keyLength int, password string) (privateKey, publicKey string, err error)
- func GetPublicKey(privateKey string, password string) (string, error)
- func IsValidPrivateKey(key string) bool
- type Algorithm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlgorithmDefaultKeyLength ¶ added in v0.0.2
func AlgorithmToString ¶ added in v0.0.2
func GenerateKeyPair ¶
func GenerateKeyPair(algo Algorithm, keyLength int, password string) (privateKey, publicKey string, err error)
GenerateKeyPair generates a password protected SSH key pair.
func GetPublicKey ¶
GetPublicKey extracts the public key from a private key string using the given password.
func IsValidPrivateKey ¶
IsValidPrivateKey checks if a given string represents a valid private key.
Types ¶
Click to show internal directories.
Click to hide internal directories.