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<TimerangeBound<SignatureGated<HsDesc>>>
pub fn decrypt( self, subcredential: &Subcredential, hsc_desc_enc: Option<(&HsClientDescEncKey, &HsClientDescEncSecretKey)> ) -> Result<TimerangeBound<SignatureGated<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.
Auto Trait Implementations§
impl RefUnwindSafe for EncryptedHsDesc
impl Send for EncryptedHsDesc
impl Sync for EncryptedHsDesc
impl Unpin for EncryptedHsDesc
impl UnwindSafe for EncryptedHsDesc
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more