1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//! Implementation of the [box-stream](https://github.com/dominictarr/pull-box-stream)
//! encryption protocol. This crate provides structs which wrap (async) readers and/or
//! writers, decrypting all reads and encrypting all writes.

#![deny(missing_docs)]

extern crate libc;
extern crate sodiumoxide;
#[macro_use]
extern crate futures_core;
extern crate futures_io;

pub mod crypto;
mod box_writer;
mod box_reader;
mod box_duplex;
mod decryptor;
mod encryptor;

pub use decryptor::{UNAUTHENTICATED_EOF, INVALID_LENGTH, UNAUTHENTICATED_HEADER,
                    UNAUTHENTICATED_PACKET};

pub use box_writer::*;
pub use box_reader::*;
pub use box_duplex::*;

#[cfg(test)]
extern crate async_ringbuffer;
#[cfg(test)]
extern crate atm_io_utils;
#[cfg(test)]
extern crate futures;

#[cfg(test)]
mod test;