Struct internet2::NoiseTranscoder [−][src]
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: NoiseEncryptor
decryptor: 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.