Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindKeyByHash ¶
FindKeyByHash finds the key which has the same hash of h.
func IsSimpleName ¶
IsSimpleName checks if the user name is a simple one that is safe to fetch a key.
Types ¶
type FileKeyRegistry ¶
type FileKeyRegistry struct {
// contains filtered or unexported fields
}
FileKeyRegistry is a storage of public keys backed by a file system.
func NewFileKeyRegistry ¶
func NewFileKeyRegistry(keys map[string]string) *FileKeyRegistry
NewFileKeyRegistry creates a new key store given a key file map for each users that has a key.
type KeyRegistry ¶
KeyRegistry loads public keys for a user.
func OpenKeyRegistry ¶
func OpenKeyRegistry(urlStr string) (KeyRegistry, error)
OpenKeyRegistry connects to a keystore based on the given URL string.
type MemKeyRegistry ¶
type MemKeyRegistry struct {
// contains filtered or unexported fields
}
MemKeyRegistry is a storage of public keys in memory.
func NewDirKeyRegistry ¶
func NewDirKeyRegistry(dir string) (*MemKeyRegistry, error)
NewDirKeyRegistry creates a new keystore with public keys saved in files under a directory.
func NewMemKeyRegistry ¶
func NewMemKeyRegistry() *MemKeyRegistry
NewMemKeyRegistry creates a new empty key store.
type WebKeyRegistry ¶
type WebKeyRegistry struct {
// contains filtered or unexported fields
}
WebKeyRegistry is a storage of public keys backed by a web site.
func NewWebKeyRegistry ¶
func NewWebKeyRegistry(base *url.URL) *WebKeyRegistry
NewWebKeyRegistry creates a new key store backed by a web site at the given base URL.