pub struct NoiseTranscoder {
    pub encryptor: NoiseEncryptor,
    pub decryptor: NoiseDecryptor,
}
Expand description

Returned after a successful handshake to encrypt and decrypt communication with peer nodes. It should not normally be manually instantiated. Automatically handles key rotation. For decryption, it is recommended to call decrypt_message_stream for automatic buffering.

Fields

encryptor: NoiseEncryptordecryptor: NoiseDecryptor

Implementations

Instantiate a new Conduit with specified sending and receiving keys

Encrypt data to be sent to peer

Decrypt a single message. If data containing more than one message has been received, only the first message will be returned, and the rest stored in the internal buffer. If a message pending in the buffer still hasn’t been decrypted, that message will be returned in lieu of anything new, even if new data is provided.

Trait Implementations

First separable type (like reader)

Second separable type (like writer)

Reconstruct the type from the halves

Split the type into two

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.