Documentation ¶
Index ¶
- Constants
- type Key
- func (key *Key) AuthorizedKey() string
- func (key *Key) BinFingerprintMD5() []byte
- func (key *Key) BinFingerprintSHA256() []byte
- func (key *Key) DecodePEM(data []byte) error
- func (key *Key) EncodePEM() []byte
- func (key *Key) FingerprintMD5() string
- func (key *Key) FingerprintSHA256() string
- func (key *Key) Id() string
- func (key *Key) MarshalJSON() ([]byte, error)
- func (key *Key) Signer() ssh.Signer
- func (key *Key) UnmarshalJSON(data []byte) error
- type KeyType
Constants ¶
View Source
const ( KeyRsa2048 = KeyType(iota) KeyRsa4096 KeyEcdsa256 KeyEcdsa384 KeyEcdsa521 KeyEd25519 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key struct { Type KeyType // Key type Comment string // Key comment // contains filtered or unexported fields }
Key structure
func (*Key) AuthorizedKey ¶
Generate public key string for inclusion into authorized_keys file
func (*Key) BinFingerprintMD5 ¶
Generate MD5 binary fingerprint
func (*Key) BinFingerprintSHA256 ¶
Generate SHA256 binary fingerprint
func (*Key) FingerprintMD5 ¶
Generate MD5 fingerprin in OpenSSH text formatt
func (*Key) FingerprintSHA256 ¶
Generate SHA256 fingerprint in OpenSSH text format
func (*Key) UnmarshalJSON ¶
Unmarshal key from JSON
type KeyType ¶
type KeyType int
Key type
func (*KeyType) UnmarshalJSON ¶
Unmarshal KeyType from JSON
Click to show internal directories.
Click to hide internal directories.