pub enum V2Handshake {
Initiator {
private_key: [u8; 32],
ellswift: [u8; 64],
},
Responder {
private_key: [u8; 32],
initiator_ellswift: Option<[u8; 64]>,
},
}Expand description
BIP324 handshake state
Variants§
Implementations§
Source§impl V2Handshake
impl V2Handshake
Sourcepub fn new_initiator() -> (Vec<u8>, Self)
pub fn new_initiator() -> (Vec<u8>, Self)
Create a new initiator handshake
Sourcepub fn new_responder() -> Self
pub fn new_responder() -> Self
Create a new responder handshake
Sourcepub fn process_initiator_message(
&mut self,
initiator_msg: &[u8],
) -> Result<(Vec<u8>, V2Transport)>
pub fn process_initiator_message( &mut self, initiator_msg: &[u8], ) -> Result<(Vec<u8>, V2Transport)>
Process initiator message (responder side)
Sourcepub fn complete_handshake(self, responder_msg: &[u8]) -> Result<V2Transport>
pub fn complete_handshake(self, responder_msg: &[u8]) -> Result<V2Transport>
Complete handshake (initiator side)
Auto Trait Implementations§
impl Freeze for V2Handshake
impl RefUnwindSafe for V2Handshake
impl Send for V2Handshake
impl Sync for V2Handshake
impl Unpin for V2Handshake
impl UnsafeUnpin for V2Handshake
impl UnwindSafe for V2Handshake
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more