Struct tor_netdoc::doc::hsdesc::EncryptedHsDesc
source · pub struct EncryptedHsDesc { /* private fields */ }
Available on crate feature
hs-common
only.Expand description
An onion service after it has been parsed by the client, but not yet decrypted.
Implementations§
source§impl EncryptedHsDesc
impl EncryptedHsDesc
sourcepub fn decrypt(
self,
subcredential: &Subcredential,
hsc_desc_enc: Option<(&HsClientDescEncKey, &HsClientDescEncSecretKey)>
) -> Result<HsDesc>
pub fn decrypt( self, subcredential: &Subcredential, hsc_desc_enc: Option<(&HsClientDescEncKey, &HsClientDescEncSecretKey)> ) -> Result<HsDesc>
Attempt to decrypt both layers of encryption in this onion service descriptor.
If hsc_desc_enc
is provided, we use it to decrypt the inner encryption layer;
otherwise, we require that the inner document is encrypted using the “no
client authorization” method.
Note that hsc_desc_enc
must be a key pair - ie, a KP_hsc_desc_enc
and corresponding KS_hsc_desc_enc. This function does not check
this.