doc: add features table
This commit is contained in:
parent
870358e0b0
commit
c8afcf9e42
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue