mirror of
https://git.asonix.dog/asonix/http-signature-normalization.git
synced 2024-11-21 17:00:59 +00:00
Fix feature builds
This commit is contained in:
parent
d6f7602e31
commit
3c73552ff2
5 changed files with 6 additions and 3 deletions
|
@ -1,7 +1,7 @@
|
|||
[package]
|
||||
name = "http-signature-normalization-reqwest"
|
||||
description = "An HTTP Signatures library that leaves the signing to you"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
authors = ["asonix <asonix@asonix.dog>"]
|
||||
license-file = "LICENSE"
|
||||
readme = "README.md"
|
||||
|
|
|
@ -14,7 +14,7 @@ This crate provides extensions the RequestBuilder type from reqwest
|
|||
#### First, add this crate to your dependencies
|
||||
```toml
|
||||
thiserror = "0.1"
|
||||
http-signature-normalization-reqwest = { version = "0.1.0", default-features = false, features = ["sha-2"] }
|
||||
http-signature-normalization-reqwest = { version = "0.1.1", default-features = false, features = ["sha-2"] }
|
||||
sha2 = "0.9"
|
||||
```
|
||||
|
||||
|
|
|
@ -2,7 +2,9 @@ use crate::{Config, Sign, SignError};
|
|||
use reqwest::{Body, RequestBuilder};
|
||||
use std::{fmt::Display, future::Future, pin::Pin};
|
||||
|
||||
#[cfg(feature = "sha-2")]
|
||||
mod sha2;
|
||||
#[cfg(feature = "sha-3")]
|
||||
mod sha3;
|
||||
|
||||
/// A trait for creating digests of an array of bytes
|
||||
|
|
|
@ -5,7 +5,7 @@ use sha3::{
|
|||
|
||||
use super::DigestCreate;
|
||||
|
||||
fn create(digest: &mut impl sha2::Digest, input: &[u8]) -> String {
|
||||
fn create(digest: &mut impl sha3::Digest, input: &[u8]) -> String {
|
||||
digest.update(input);
|
||||
base64::encode(&digest.finalize_reset())
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ use std::fmt::Display;
|
|||
|
||||
pub use http_signature_normalization::RequiredError;
|
||||
|
||||
#[cfg(feature = "digest")]
|
||||
pub mod digest;
|
||||
|
||||
pub mod prelude {
|
||||
|
|
Loading…
Reference in a new issue