[−][src]Struct kuska_handshake::KeyNonce
A pair of key and nonce used for encryption/decryption of every message in the boxstream.
Implementations
impl KeyNonce
[src]
pub fn new(key: Key, nonce: Nonce) -> Self
[src]
Creates a new KeyNonce
from a key and a nonce.
pub fn from_handshake(handshake_complete: HandshakeComplete) -> (Self, Self)
[src]
Derives the sender and receiver KeyNonce
from a HandshakeComplete
. Returns
(key_nonce_send, key_nonce_recv)
.
pub fn increment_nonce_be_inplace(&mut self)
[src]
Increments the nonce value by one. The nonce value is encoded/decoded in big endian, following the boxstream spec.
Trait Implementations
impl Debug for KeyNonce
[src]
impl PartialEq<KeyNonce> for KeyNonce
[src]
impl StructuralPartialEq for KeyNonce
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyNonce
[src]
impl Send for KeyNonce
[src]
impl Sync for KeyNonce
[src]
impl Unpin for KeyNonce
[src]
impl UnwindSafe for KeyNonce
[src]
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>,