Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKey ¶
func GenerateKey(comment string) (*PublicKey, *PrivateKey, error)
Types ¶
type PrivateKey ¶
type PrivateKey struct {
// contains filtered or unexported fields
}
func ParsePrivateKey ¶
func ParsePrivateKey(content []byte, comment string) (*PrivateKey, error)
ParsePrivateKey unmarshals an SSH private key and attaches the given comment. The data already contains the comment, but it's better to present this awkward API than attempt to reimplement the parsing ourselves.
func (PrivateKey) Equal ¶
func (k PrivateKey) Equal(other PrivateKey) bool
func (PrivateKey) MarshalText ¶
func (k PrivateKey) MarshalText() ([]byte, error)
func (PrivateKey) SignHostKey ¶
func (k PrivateKey) SignHostKey(key PublicKey) (*PublicKey, error)
func (PrivateKey) SignUserKey ¶
func (k PrivateKey) SignUserKey(key PublicKey, principals []string) (*PublicKey, error)
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func ParsePublicKey ¶
func (PublicKey) Fingerprint ¶
Click to show internal directories.
Click to hide internal directories.