Kuska-ssb / ssb

Secure Scuttlebut library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement from_secret_file(&str path)

Powersource opened this issue · comments

It would be like from_patchwork_local but the signature would be something like

pub fn from_secret_file(&str path) -> Result<OwnedIdentity> {

(sorry if my rust is rusty)

This is a part of fixing Kuska-ssb/solar#1 . For that issue it would also help to be able to create secret files, I'm guessing there's no way of doing that with kuska so far right? But anyway that would be for another issue.

I might want to do this issue, shouldn't be too hard. But we'll see if I actually do :P

At this moment there's the

pub fn from_patchwork_config<T: AsRef<str>>(config: T) -> Result<OwnedIdentity>

But, like 40% of the code is something that I need to refactor in some way, so I will use an async_std::io::Reader instead of a reference to a path string,

I will add an option to serialize the identity, also.