Documentation ¶
Overview ¶
Package utils is for various "other" functions that things in Flitter use that may be useful in other places but are not unique or special enough to be in their own package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanConnect ¶
CanConnect checks a given SSH key against the list of authorized users in etcd to check if a user with a given key is allowed to connect. It takes in an active etcd.Client struct pointer and the ssh key to test and returns a username and boolean representing if they are allowed to connect.
func FPAddColons ¶
addColons adds colons every second character in a string to make the formatting of a public key fingerprint match the common standard:
dd3bb82e850406e9abffa80ac0046ed6
becomes
dd:3b:b8:2e:85:04:06:e9:ab:ff:a8:0a:c0:04:6e:d6
func GetFingerprint ¶
getFingerprint takes an SSH key in and returns the fingerprint (an MD5 sum) and adds the needed colons to it.
func HashPassword ¶
HashPassword hashes a password with pbkdf2. This is probably good enough.
Types ¶
This section is empty.