Cargo Features

[dependencies]
otp-std = { version = "0.1.0", default-features = false, features = ["unsafe-length", "generate-secret", "auth", "serde", "sha2"] }
default = auth, generate-secret

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

unsafe-length

Affects length::Error

generate-secret default

Enables rand

Affects secret::generate

auth default

Enables url and urlencoding

Affects label::ISSUER, base::SECRET, base::ALGORITHM, base::DIGITS, base::SecretNotFoundError, base::ErrorSource, base::Error, hotp::COUNTER, hotp::CounterNotFoundError, hotp::ErrorSource, hotp::Error, otp-std::auth, otp::ErrorSource, otp::Error, totp::PERIOD, totp::ErrorSource, totp::Error

Features from optional dependencies

serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

sha2 implicit feature

Affects algorithm::HmacSha256, algorithm::HmacSha512, algorithm::SHA256, algorithm::SHA512, algorithm::hmac_sha256, algorithm::hmac_sha512