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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! The `snow` crate is a straightforward, Hard To Fuck Up™ Noise Protocol implementation.
//!
//! Read the [Noise Protocol Framework Spec](http://noiseprotocol.org/noise.html) for more
//! information.
//!
//! The typical usage flow is to use `NoiseBuilder` to construct a `Session`, which is main
//! state machine you will want to interact with.
//!
//! # Examples
//! See `examples/simple.rs` for a more complete TCP client/server example.
//!
//! ```rust,ignore
//! let noise = NoiseBuilder::new("Noise_NN_ChaChaPoly_BLAKE2s".parse().unwrap())
//! .build_initiator()
//! .unwrap();
//!
//! let mut buf = [0u8; 65535];
//!
//! // write first handshake message
//! noise.write_message(&[0u8; 0], &mut buf).unwrap();
//!
//! // receive response message
//! let incoming = receive_message_from_the_mysterious_ether();
//! noise.read_message(&incoming, &mut buf).unwrap();
//!
//! // complete handshake, and transition the state machine into transport mode
//! let noise = noise.into_transport_mode();
//!
//! ```
extern crate arrayvec;
extern crate byteorder;
extern crate static_slice;
extern crate error_chain;
extern crate ring;
pub use *;
pub use ;
pub use NoiseBuilder;
pub use Session;
pub use RingAcceleratedResolver;