Struct keynesis::noise::TransportReceiveHalf [−][src]
Implementations
impl<H: Hash> TransportReceiveHalf<H>
[src]
pub fn noise_session(&self) -> &H::HASH
[src]
unique identifier of the noise session
pub fn remote_public_identity(&self) -> &PublicKey
[src]
get the remote's public identity
pub fn count_received(&self) -> u64
[src]
get the number of message received from the remote peer
this function will be a little tainted by the handshake state it also account for the number of times either encrypt or decrypt has been used during the handshake. This is because during the handshake the exchange is symmetrical while in the transport era the exchanges are asymmetrical.
pub fn receive(
&mut self,
input: impl AsRef<[u8]>,
output: &mut [u8]
) -> Result<(), CipherStateError>
[src]
&mut self,
input: impl AsRef<[u8]>,
output: &mut [u8]
) -> Result<(), CipherStateError>
receive message from the remote peer
The output can have 16 bytes less than the input. This is because the MAC is appended in the input message so we can verify the message has not been tempered with.
Auto Trait Implementations
impl<H> RefUnwindSafe for TransportReceiveHalf<H> where
<H as Hash>::HASH: RefUnwindSafe,
[src]
<H as Hash>::HASH: RefUnwindSafe,
impl<H> Send for TransportReceiveHalf<H> where
<H as Hash>::HASH: Send,
[src]
<H as Hash>::HASH: Send,
impl<H> Sync for TransportReceiveHalf<H> where
<H as Hash>::HASH: Sync,
[src]
<H as Hash>::HASH: Sync,
impl<H> Unpin for TransportReceiveHalf<H> where
<H as Hash>::HASH: Unpin,
[src]
<H as Hash>::HASH: Unpin,
impl<H> UnwindSafe for TransportReceiveHalf<H> where
<H as Hash>::HASH: UnwindSafe,
[src]
<H as Hash>::HASH: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,