Versions in this module Expand all Collapse all v1 v1.6.5 Oct 30, 2020 Changes in this version + var ErrInvalidDSAKeySize = fmt.Errorf("sshkey: invalid private key dsa size, must be one of 1024, 2048 or 3072") + var ErrInvalidECDSAKeySize = fmt.Errorf("sshkey: invalid private key ecdsa size, must be one of 256, 384 or 521") + var ErrInvalidRSAKeySize = fmt.Errorf("sshkey: invalid private key rsa size: must be more than 1024") + var ErrUnknownAlgorithm = fmt.Errorf("sshkey: unknown private key algorithm") + type Algorithm int + const DSA + const ECDSA + const ED25519 + const RSA + func AlgorithmString(s string) (Algorithm, error) + func AlgorithmValues() []Algorithm + func (i Algorithm) IsAAlgorithm() bool + func (i Algorithm) String() string + type Pair struct + Private []byte + Public []byte + func GeneratePair(t Algorithm, rand io.Reader, bits int) (*Pair, error) + func NewPair(public, private interface{}) (*Pair, error) + func PairFromDSA(key *dsa.PrivateKey) (*Pair, error) + func PairFromED25519(public ed25519.PublicKey, private ed25519.PrivateKey) (*Pair, error)