Struct noise_sv2::TransportMode[][src]

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

Helper struct that wraps the transport state and provides convenient interface to read/write messages

Implementations

Decrypt and verify message from in_buf and append the result to decrypted_message

TODO check if decrypt msg len is always encrypted msg len - TAG_LEN

Return the size that decrypt_msg in Self::read should have in order to decrypt the encrypted payload

If the encrypted payload has an invalid length it panic

Return the size that encrypt_msg in Self::write should have in order to encrypt the payload

Encrypt a message specified in plain_msg and write the encrypted message into a encrypted It also encode the length of the encrypted message as the first 2 bytes

Trait Implementations

Formats the value using the given formatter. Read more

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.

Should always be Self

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.