From c8afcf9e42f3c9f6e7237010d77e32c757457e19 Mon Sep 17 00:00:00 2001 From: MedzikUser Date: Sun, 12 Jun 2022 20:55:45 +0200 Subject: [PATCH] doc: add features table --- README.md | 9 ++++++++- src/lib.rs | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4597dab..b21c30c 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ Cryptography Utils for Rust ### Importing -The driver is available on [crates.io](https://crates.io/crates/crypto-utils). To use the driver in +The driver is available on [crates-io](https://crates.io/crates/crypto-utils). To use the driver in your application, simply add it to your project's `Cargo.toml`. ```toml @@ -76,4 +76,11 @@ let token = Token::new(secret, claims).unwrap(); let decoded = Token::decode(secret, token.encoded).unwrap(); ``` +### All Feature flags + +| Feature | Description | Dependencies | Default | +|:-----------|:-------------------------------------------------------------|:-------------------------------------------|:--------| +| `sha` | Enable support for the Sha1, Sha256 and Sha512 hasher | `sha` and `sha2` | yes | +| `jwt` | Enable support for the Json Web Token utils | `chrono`, `serde` and `jsonwebtoken` | yes | + License: MIT diff --git a/src/lib.rs b/src/lib.rs index e27064c..be14938 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,6 +73,13 @@ //! // decode token //! let decoded = Token::decode(secret, token.encoded).unwrap(); //! ``` +//! +//! ## All Feature flags +//! +//! | Feature | Description | Dependencies | Default | +//! |:-----------|:-------------------------------------------------------------|:-------------------------------------------|:--------| +//! | `sha` | Enable support for the Sha1, Sha256 and Sha512 hasher | `sha` and `sha2` | yes | +//! | `jwt` | Enable support for the Json Web Token utils | `chrono`, `serde` and `jsonwebtoken` | yes | #[cfg(feature = "jwt")] pub mod jsonwebtoken;