Struct tor_netdoc::doc::hsdesc::HsDescMiddle
source · pub struct HsDescMiddle { /* private fields */ }
Available on crate features
hs-common
and hsdesc-inner-docs
only.Expand description
A more-or-less verbatim representation of the middle document of an onion service descriptor.
Implementations§
source§impl HsDescMiddle
impl HsDescMiddle
sourcepub fn decrypt_inner(
&self,
blinded_id: &HsBlindId,
revision: RevisionCounter,
subcredential: &Subcredential,
key: Option<&HsClientDescEncSecretKey>
) -> Result<Vec<u8>, HsDescError>
pub fn decrypt_inner( &self, blinded_id: &HsBlindId, revision: RevisionCounter, subcredential: &Subcredential, key: Option<&HsClientDescEncSecretKey> ) -> Result<Vec<u8>, HsDescError>
Decrypt the encrypted inner document contained within this middle document.
If present, key
is an authorization key, and we assume that the
decryption is nontrivial.
A failure may mean either that the encryption was corrupted, or that we didn’t have the right key.
source§impl HsDescMiddle
impl HsDescMiddle
sourcepub fn parse(s: &str) -> Result<HsDescMiddle>
pub fn parse(s: &str) -> Result<HsDescMiddle>
Try to parse the middle document of an onion service descriptor from a provided string.
Trait Implementations§
source§impl Clone for HsDescMiddle
impl Clone for HsDescMiddle
source§fn clone(&self) -> HsDescMiddle
fn clone(&self) -> HsDescMiddle
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl RefUnwindSafe for HsDescMiddle
impl Send for HsDescMiddle
impl Sync for HsDescMiddle
impl Unpin for HsDescMiddle
impl UnwindSafe for HsDescMiddle
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