[][src]Function sphinxcrypto::server::sphinx_packet_unwrap

pub fn sphinx_packet_unwrap(
    private_key: &PrivateKey,
    packet: &mut [u8]
) -> (Option<Vec<u8>>, Option<[u8; 32]>, Option<Vec<RoutingCommand>>, Option<SphinxUnwrapError>)

unwrap a layer of sphinx packet encryption

Arguments

  • private_key - an ecdh private key
  • packet - a mutable reference to a Sphinx packet gets updated to the new Sphinx packet to be sent to the next hop.

Returns

  • 4-tuple containing (payload, replay_tag, vector of routing commands, SphinxUnwrapError)