Expand description
Scram-RS (Sync and Async)
Provides a SASL SCRAM:
- SHA1
- SHA256
- SHA512
- -PLUS
Features:
-
use_ring
- adds crate: ring as an alternative hashing and other crypto functions. -
exclude_sha1
- if enabled excludes the SHA1. -
std
- when set uses std lib, if removed, a no_std + alloc -
without_async
- excludes the async code
For default crypto crates: scram-rs = { version = “0.13”, default-features = true}
For ring
crypto crates:
scram-rs = { version = “0.13”, default-features = false, features = [“use_ring”]}
§scram_sha256_server() sync/async tests (DEBUG)
iteration | rust-native | use_ring |
---|---|---|
1 | 152.30ms | 16.96ms |
2 | 143.78ms | 16.52ms |
3 | 144.70ms | 16.04ms |
§scram_sha256_works() async tests (DEBUG)
iteration | rust-native | use_ring |
---|---|---|
1 | 143.68ms | 16.15ms |
2 | 143.66ms | 15.98ms |
3 | 144.40ms | 17.12ms |
For usage see ./examples/
Files:
- scram.rs contains client/server sync and async protocol handler
- scram_sync.rs a synchronious realization of the protocol handler
- scram_async.rs an asynchronious realization of the protocol handler
- scram_parser.rs a scram message parser
- scram_state.rs a global state of the protocol handler
- scram_hashing.rs contains all supported hashers implementation
- scram_error.rs error reporting code
- scram_common.rs a common code
- scram_cb.rs a channel bind code
- scram_auth.rs a authentification callbacks and interface
Re-exports§
pub use scram_cb::ChannelBindType;
pub use scram_common::ScramTypes;
pub use scram::*;
pub use scram_auth::*;
pub use scram_common::*;
pub use scram_hashing::*;
pub use scram_error::*;
pub use scram_cbh::*;
pub use scram_dyn::*;
Modules§
Macros§
- Use this macro in functions of trais ScramCbHelper, AsyncScramCbHelper on client side in order to indicate that the data is not possible to retrive
- Use this macro in functions of trais ScramCbHelper, AsyncScramCbHelper on server side in order to indicate that the data is not possible to retrive
- Use this macro in functions of trais ScramCbHelper, AsyncScramCbHelper on client side in order to indicate that this type of channel bind is not supported!
- Use this macro in functions of trais ScramCbHelper, AsyncScramCbHelper on server side in order to indicate that this type of channel bind is not supported!