pub struct ForwardKeys {
pub rho: [u8; 32],
pub mu: [u8; 32],
}Expand description
Keys used to forward the onion packet.
Fields§
§rho: [u8; 32]Key derived from the shared secret for the hop. It is used to encrypt the packet data.
mu: [u8; 32]Key derived from the shared secret for the hop. It is used to compute the HMAC of the packet data.
Implementations§
Source§impl ForwardKeys
impl ForwardKeys
Sourcepub fn new(shared_secret: &[u8]) -> ForwardKeys
pub fn new(shared_secret: &[u8]) -> ForwardKeys
Derive keys for forwarding the onion packet from the shared secret.
Trait Implementations§
Source§impl Clone for ForwardKeys
impl Clone for ForwardKeys
Source§fn clone(&self) -> ForwardKeys
fn clone(&self) -> ForwardKeys
Returns a duplicate 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 moreSource§impl Debug for ForwardKeys
impl Debug for ForwardKeys
Source§impl PartialEq for ForwardKeys
impl PartialEq for ForwardKeys
impl Eq for ForwardKeys
impl StructuralPartialEq for ForwardKeys
Auto Trait Implementations§
impl Freeze for ForwardKeys
impl RefUnwindSafe for ForwardKeys
impl Send for ForwardKeys
impl Sync for ForwardKeys
impl Unpin for ForwardKeys
impl UnwindSafe for ForwardKeys
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