Cargo Features

[dependencies]
scram-rs = { version = "0.15.0", default-features = false, features = ["use_ring", "exclude_sha1", "std", "without_async", "without_capi"] }
default = std, use_ring

These default features are set whenever scram-rs is added without default-features = false somewhere in the dependency tree.

use_ring default

Adds a crate ring which implements pbkdf2, hmac and which is faster but less safe.

Affects scram_hashing_sha1::sha1_ring_based, scram_hashing_sha2::sha256_ring_based, scram_hashing_sha5::sha512_ring_based

exclude_sha1

When added, removes SHA-1 from implementation. SHA-1 is unsafe and for this reason a +
is not supported to encourage developers not to use it.

std default

A program which includes this crate is based on standart library i.e std.
For non-std an alloc crate is exported.
Enabled by default.
If CAPI was NOT excluded, and std was excluded, the crate will not be able to allocate memory in heap. For this reason, the set_allocator() should be called before using this crate in C program.

without_async

Removes async implementations from the crate.

without_capi

Removes the C-bindings API.