Expand description
Scram-RS (Sync and Async)
Since v 0.4.2 this project is relicensed with MPLv2.0. The contributors and authors agreed to change license: Aleksandr Morozov RELKOM s.r.o
Provides a SASL SCRAM:
- SHA1
- SHA256
- SHA512
- -PLUS
Features:
use_default- uses crates: pbkdf2, hmac, sha2, sha1 as a common hasing libsuse_ring- uses crates: ring as a common hashing lib
For default crypto crates: scram-rs = { version = “0.4”, default-features = true}
For ring crypto crates:
scram-rs = { version = “0.4”, default-features = false, features = [“use_ring”]}
scram_sha256_server() sync/async tests (DEBUG)
| iteration | use_default | use_ring |
|---|---|---|
| 1 | 152.30ms | 16.96ms |
| 2 | 143.78ms | 16.52ms |
| 3 | 144.70ms | 16.04ms |
scram_sha256_works() async tests (DEBUG)
| iteration | use_default | 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::*;pub use scram_auth::*;pub use scram_common::*;pub use scram_hashing::*;pub use scram_error::*;pub use scram_cbh::*;
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!