Crate scram_rs

source ·
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 libs
  • use_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)

iterationuse_defaultuse_ring
1152.30ms16.96ms
2143.78ms16.52ms
3144.70ms16.04ms

scram_sha256_works() async tests (DEBUG)

iterationuse_defaultuse_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