Skip to content

feat: digest is configurable#26

Open
DXist wants to merge 1 commit into
junkurihara:developfrom
DXist:feat/configurable_content_digest
Open

feat: digest is configurable#26
DXist wants to merge 1 commit into
junkurihara:developfrom
DXist:feat/configurable_content_digest

Conversation

@DXist
Copy link
Copy Markdown

@DXist DXist commented May 20, 2026

This PR allows to selectively configure supported content digest crypto hash functions using cargo features.

When neither "digest-sha256" nor "digest-sha512" feature is enabled, the content digest code is completely configured out.

[rinatshigapov@MacBook-Pro-Rinat httpsig-rs (feat/configurable_content_digest)]$ cargo build --no-default-features --features="blocking digest-sha512"
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.20s
[rinatshigapov@MacBook-Pro-Rinat httpsig-rs (feat/configurable_content_digest)]$ cargo build --no-default-features --features="blocking digest-sha256"
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s
[rinatshigapov@MacBook-Pro-Rinat httpsig-rs (feat/configurable_content_digest)]$ cargo build --no-default-features --features="blocking"
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.03s

@DXist
Copy link
Copy Markdown
Author

DXist commented May 24, 2026

I think digest features should be opt-in by default, because there might be non-sensitive use cases, where it's enough to sign only request metadata without a content payload.

Also, content digest is not trivial for streaming requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant