Crate scram_rs

source ·
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)

iterationrust-nativeuse_ring
1152.30ms16.96ms
2143.78ms16.52ms
3144.70ms16.04ms

§scram_sha256_works() async tests (DEBUG)

iterationrust-nativeuse_ring
1143.68ms16.15ms
2143.66ms15.98ms
3144.40ms17.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§

Modules§

Macros§

Attribute Macros§