Crate ssb_keyfile [] [src]

Read or create ssb keyfiles.

This library uses libsodium internally. In application code, call sodiumoxide::init() before using any functions from this module that generate keyfiles.

Enums

KeyfileError

The reasons why reading keys from a file can fail.

Constants

KEYFILE_NAME

The name of the ssb keyfile.

Functions

keyfile_path

A convenience function that returns the full path to the ssb secret file.

keys_from_str

Parse the public and secret key from the content of a key file as a string.

load_keys

Read the key file from the default location and parse the keys from it.

load_keys_from_path

Read the key file at the given path and parse the keys from it.

load_or_create_keys

Read the keyfile from the default location and parse the keys from it. If the keyfile does not exist, it is created instead (with randomly generated keys).

new_keyfile_string

Create a string containing the content of a new secret file for the given keys.