Struct kuska_handshake::BoxStreamRecv[][src]

pub struct BoxStreamRecv { /* fields omitted */ }
Expand description

The transport agnostic boxstream receiving side.

Implementations

Create a new BoxStreamRecv from the key_nonce.

Decrypt a single boxstream message every two calls (one to decrypt and parse the header, the other do decrypt the body) by decrypting from buf and writting the plaintex into dec. Returns the number of bytes read from buf and the number of bytes written into dec. If a goodbye message is received, an Err(Error::Goodbye) will be returned and the following calls will return Ok((0, 0)).

Returns the number of received bytes needed for the next decrypt call.

Returns whether the goodbye message has been received or not.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.