pub struct SphinxHeader {
pub shared_secret: PublicKey,
pub routing_info: Box<EncapsulatedRoutingInformation>,
}Fields§
Alpha element
routing_info: Box<EncapsulatedRoutingInformation>Implementations§
Source§impl SphinxHeader
impl SphinxHeader
Sourcepub fn process_with_expanded_secret(
self,
expanded_secret: &ExpandedSharedSecret,
) -> Result<ProcessedHeader>
pub fn process_with_expanded_secret( self, expanded_secret: &ExpandedSharedSecret, ) -> Result<ProcessedHeader>
Processes the header with the provided expanded shared secret It could be useful in the situation where caller has already derived the value, because, for example, he had to obtain the reply tag.
pub fn process(self, node_secret_key: &StaticSecret) -> Result<ProcessedHeader>
Using the provided packet’s alpha and node’s secret key, expand it into the output of all required random oracles
pub fn ensure_header_integrity( &self, expanded_shared_secret: &ExpandedSharedSecret, ) -> Result<()>
pub fn unchecked_process_as_current( self, node_secret_key: &StaticSecret, ) -> Result<ProcessedHeader>
👎Deprecated
pub fn unchecked_process_as_legacy( self, node_secret_key: &StaticSecret, ) -> Result<ProcessedHeader>
👎Deprecated
pub fn to_bytes(&self) -> Vec<u8> ⓘ
pub fn from_bytes(bytes: &[u8]) -> Result<Self>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SphinxHeader
impl RefUnwindSafe for SphinxHeader
impl Send for SphinxHeader
impl Sync for SphinxHeader
impl Unpin for SphinxHeader
impl UnwindSafe for SphinxHeader
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