[][src]Struct kuska_handshake::KeyNonce

pub struct KeyNonce { /* fields omitted */ }

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.