Cargo Features

[dependencies]
otp-std = { version = "0.2.3", 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 base::SECRET, base::ALGORITHM, base::DIGITS, base::SecretNotFoundError, base::ErrorSource, base::Error, hotp::COUNTER, hotp::CounterNotFoundError, hotp::ErrorSource, hotp::Error, otp-std::auth, core::ErrorSource, core::Error, type_of::NotFoundError, type_of::ErrorSource, type_of::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_LENGTH, algorithm::SHA512_LENGTH, algorithm::SHA256, algorithm::SHA512, algorithm::new_hmac_sha256, algorithm::hmac_sha256, algorithm::new_hmac_sha512, algorithm::hmac_sha512