noisegate_keys (noisegate v1.0.0)
View SourceSummary
Types
The secret is only reachable through secret/1, so that printing or logging a key_info() cannot leak it.
Types
-opaque key_info()
-type opts() :: #{dir => file:filename(), generate => boolean(), authorized_dirs => [file:filename()] | string(), keygen => fun(() -> {binary(), binary()}), node_name => node_name(), comment => binary() | string()}.
-type peer_entry() :: #{name := binary(), key := binary(), fingerprint := string(), comment := binary(), file := file:filename(), dir := file:filename()}.
-type skipped() :: #{file := file:filename(), reason := term()}.
The secret is only reachable through secret/1, so that printing or logging a key_info() cannot leak it.
Functions
-spec add_peer(binary(), binary(), opts()) -> {ok, file:filename()} | {error, term()}.
-spec authorized_dirs(node_name(), opts()) -> [file:filename()].
-spec list_peers(opts()) -> {ok, [peer_entry()], [skipped()]} | {error, term()}.
-spec node_key_dir(node_name(), opts()) -> file:filename().
-spec print_public() -> ok.