func GenerateId() string { b := make([]byte, 16) if _, err := rand.Read(b); err != nil { return "" } return utils.Fingerprint(b).ToShortName() }
func KeyFingerprint(key key.PublicKey) utils.Fingerprint { bytes := sha256.Sum256(key.Marshal()) return utils.Fingerprint(bytes[:]) }