Struct sphinx_packet::packet::SphinxPacket
source · pub struct SphinxPacket {
pub header: SphinxHeader,
pub payload: Payload,
}Fields§
§header: SphinxHeader§payload: PayloadImplementations§
source§impl SphinxPacket
impl SphinxPacket
pub fn new( message: Vec<u8>, route: &[Node], destination: &Destination, delays: &[Delay] ) -> Result<SphinxPacket>
pub fn len(&self) -> usize
sourcepub fn process_with_derived_keys(
self,
new_blinded_secret: &Option<SharedSecret>,
routing_keys: &RoutingKeys
) -> Result<ProcessedPacket>
pub fn process_with_derived_keys( self, new_blinded_secret: &Option<SharedSecret>, routing_keys: &RoutingKeys ) -> Result<ProcessedPacket>
Processes the header with the provided derived keys. It could be useful in the situation where sender is re-using initial secret and we could cache processing results.
However, unless you know exactly what you are doing, you should NEVER use this method! Prefer normal [process] instead.