5 releases (3 breaking)
0.15.0 | Oct 26, 2024 |
---|---|
0.14.1 | Sep 28, 2024 |
0.14.0 | Aug 3, 2024 |
0.10.0 | Aug 10, 2023 |
0.8.0 | Jun 8, 2023 |
#974 in Cryptography
134 downloads per month
Used in 2 crates
500KB
13K
SLoC
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
sentc-crypto = "<the actual version number>"
To install it with pre-defined crypto implementation:
- For the std keys:
sentc-crypto = { version = "<the actual version number>", features = ["std_keys"] }
- For fips complaint keys:
sentc-crypto = { version = "<the actual version number>", features = ["fips_keys"] }
- For the recommended keys:
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
Dependencies
~1–18MB
~274K SLoC