docan_rs/lib.rs
1mod error;
2pub use error::*;
3mod constants;
4pub use constants::*;
5
6#[cfg(feature = "client")]
7mod client;
8#[cfg(feature = "client")]
9pub use client::*;
10#[cfg(feature = "server")]
11mod server;
12#[cfg(feature = "server")]
13pub use server::*;
14
15/// SecurityAlgo
16///
17/// # Params
18///
19/// #1 level of security
20///
21/// #2 seed
22///
23/// #3 salt or other params
24///
25/// # Return
26///
27/// if all seed is 0x00, return None
28/// else all seed is not 0xFF return algo data,
29/// otherwise return Error
30pub type SecurityAlgo = fn(u8, &[u8], &[u8]) -> Result<Option<Vec<u8>>, DoCanError>;