Skip to main content

parse_client_keypair

Function parse_client_keypair 

Source
fn parse_client_keypair(
    key: impl AsRef<str>,
) -> Result<(HsId, HsClientDescEncKeypair), MalformedClientKeyError>
Expand description

Parse a client restricted discovery keypair, returning the HsId of the service the key is meant for, and the corresponding HsClientDescEncKeypair.

key is expected to be in the <hsid>:descriptor:x25519:<base32-encoded-x25519-public-key> format.

TODO: we might want to move this to tor-hscrypto at some point, but for now, we don’t actually need to expose this publicly.