pub struct EstablishIntro { /* private fields */ }
hs
only.Expand description
A hidden services establishes a new introduction point, by sending an EstablishIntro message.
This may represent either an outbound body that we’re sending, or a decoded body that we’re receiving.
§Usage
This type is a good choice for handling an incoming EstablishIntro message on a Relay, but not for generating an outgoing EstablishIntro message.
Onion services should not construct this message object; instead, they
should construct an EstablishIntroDetails
, and then call its
sign_and_encode
method.
Implementations§
source§impl EstablishIntro
impl EstablishIntro
sourcepub fn from_parts_for_test(
body: EstablishIntroDetails,
mac: CtByteArray<HS_MAC_LEN>,
signature: Signature
) -> Self
Available on crate feature testing
only.
pub fn from_parts_for_test( body: EstablishIntroDetails, mac: CtByteArray<HS_MAC_LEN>, signature: Signature ) -> Self
testing
only.sourcepub fn check_and_unwrap<'a>(
self,
mac_key: impl Into<HsMacKey<'a>>
) -> Result<EstablishIntroDetails, EstablishIntroSigError>
pub fn check_and_unwrap<'a>( self, mac_key: impl Into<HsMacKey<'a>> ) -> Result<EstablishIntroDetails, EstablishIntroSigError>
Check whether this EstablishIntro message is well-signed (with its included key), and well authenticated with the provided MAC key.
On success, return the EstablishIntroDetails
describing how to function
as an introduction point for this service. On failure, return an error.
sourcepub fn dangerously_unwrap(self) -> EstablishIntroDetails
pub fn dangerously_unwrap(self) -> EstablishIntroDetails
Consume this EstablishIntro message and return its body.
This is a “dangerous” function because it does not check correctness for the signature or the MAC.
Trait Implementations§
source§impl Body for EstablishIntro
impl Body for EstablishIntro
source§fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
source§fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>
source§impl Clone for EstablishIntro
impl Clone for EstablishIntro
source§fn clone(&self) -> EstablishIntro
fn clone(&self) -> EstablishIntro
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more