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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//! The base lib for all sentc libraries. Containing user- and group management as well as encryption, file-handling and search- and sortable encryption
//!
//! These are very low-level functionalities. It is recommended to use it with a sdks.
//!
//! This lib is defined as a "template" to use it with different crypto implementations thanks to rusts generic.
//! As long as the implementation follows the traits defined in sentc-crypto-core and sentc-crypto-utils crate it can be used with this lib.
//!
//! # Overview
//!
//! Users and groups are structs with generic parameter.
//! Pre-defined users and groups can be found in the keys mod
//!
//! Online actions like creating a new user or group can be found in the util_req_full mod
//! and is only available when activating the feature full_rustls or full_wasm.
//!
//! For sdk implementations that uses ffi or wasm, the export feature can be used.
//! All Keys are returned as exported string in base64 and all errors are string as well. This makes it easy to integrate with wasm.
//! In every mod there are an _export file with the export implementation of the actual mod.
//! For a full rust implementation this is not recommended.
//!
//! Every function with prepare and done or finish prefix can be used "offline" without server interactions
//! but required the server responses. This is useful when certain processes needs to be handled differently.
//!
//! # Get started
//!
//! ```toml
//! sentc-crypto = "<the actual version number>"
//! ```
//!
//! To install it with pre-defined crypto implementation:
//!
//! * For the std keys:
//! ```toml
//! sentc-crypto = { version = "<the actual version number>", features = ["std_keys"] }
//! ```
//!
//! * For fips complaint keys:
//! ```toml
//! sentc-crypto = { version = "<the actual version number>", features = ["fips_keys"] }
//! ```
//!
//! * For the recommended keys:
//! ```toml
//! sentc-crypto = { version = "<the actual version number>", features = ["rec_keys"] }
//! ```
//!
//! To get the online actions add the feature:
//! * full_rustls to use rustls
//! * full_wasm to use the web assembly requests
extern crate alloc;
/**
For server testing export every common
because using common from path via submodule resolve in version conflicts when using it in tests
*/
pub use sentc_crypto_common as sdk_common;
/**
Reexport of the crypto core crate to access the raw types
*/
pub use sentc_crypto_core as sdk_core;
pub use sentc_crypto_fips_keys as fips_keys;
pub use sentc_crypto_rec_keys as rec_keys;
pub use sentc_crypto_std_keys as std_keys;
pub use sentc_crypto_utils as sdk_utils;
pub use ;