Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add security module BPSec #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ harness = false
default = ["binary-build"]
binary-build = ["instant"]
benchmark-helpers = ["instant"]
bpsec = ["dep:sha2", "dep:hmac", "dep:hex-literal"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe also add bpsec to the default feature list


[dependencies]
humantime = "2.1.0"
Expand All @@ -45,6 +46,11 @@ crc = "3.0.1"
thiserror = "1.0.23"
bitflags = "2.2.1"

# bpsec dependencies
sha2 = { version ="0.10.6", optional = true }
hmac = { version ="0.12.1", optional = true }
hex-literal = { version ="0.3.4", optional = true }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like an unnecessary dependency as a similar function is provided by bp7 helpers. not at compile time but unless used in a hot code path this should not be a problem


# non wasm config

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ pub mod ffi;
pub mod flags;
pub mod helpers;
pub mod primary;
#[cfg(feature = "bpsec")]
pub mod security;

#[cfg(target_arch = "wasm32")]
pub mod wasm;
Expand Down
Loading
Loading