Crate ssb_keyfile

Source
Expand description

Read ssb keyfiles, as created by the js implementation.

Re-exports Keypair from the ssb-crypto crate.

Structs§

Keypair
A public/secret long-term key pair.

Enums§

KeyFileError
The reasons why reading keys from a file can fail.

Functions§

generate
Generate a new Keypair and write it to the given Write stream.
generate_at_path
Generate a new Keypair and write it to a new file at the specified Path. The path should include the file name. Fails if the path exists, or if the path is a directory.
read
Read and parse the key file from the given Read stream. May read more bytes than absolutely necessary.
read_from_path
Read and parse the key file at the given path.
read_from_str
Load keys from the string contents of a js ssb secret file.
write
Create a string containing the content of a new secret file for the given keys, in js ssb commented-json format.
write_to_path
Write the given Keypair to a new file at the specified path. path should include the file name. Fails if the path exists, or if the path is a directory.
write_to_string
Create a string with the js ssb commented-json format string encoding of the given Keypair.