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
extern crate byteorder;
extern crate hmac;
extern crate num_bigint;
extern crate rand;
extern crate sha2;
extern crate chacha;
#[macro_use]
extern crate cfg_if;
mod cipher;
pub mod blobs;
mod dh_params;
mod messages;
pub mod srd;
mod srd_errors;
pub type Result<T> = std::result::Result<T, srd_errors::SrdError>;
pub use cipher::Cipher;
pub use srd::Srd;
pub use srd_errors::SrdError;
cfg_if! {
if #[cfg(feature = "wasm")] {
extern crate wasm_bindgen;
pub use srd::SrdJsResult;
}
else {
pub mod ffi;
}
}
cfg_if! {
if #[cfg(feature = "aes")] {
extern crate aes256 as aes;
extern crate block_modes;
}
}
#[cfg(test)]
mod tests;
#[cfg(feature = "wasm")]
fn main() {}