Crate ssb_keyfile[][src]

Expand description

Read ssb keyfiles, as created by the js implementation.

Re-exports Keypair from the ssb-crypto crate.

Structs

A public/secret long-term key pair.

Enums

The reasons why reading keys from a file can fail.

Functions

Generate a new Keypair and write it to the given Write stream.

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 and parse the key file from the given Read stream. May read more bytes than absolutely necessary.

Read and parse the key file at the given path.

Load keys from the string contents of a js ssb secret file.

Create a string containing the content of a new secret file for the given keys, in js ssb commented-json format.

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.

Create a string with the js ssb commented-json format string encoding of the given Keypair.