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§
- KeyFile
Error - 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.