Skip to content

Cleanup/misc cleanup Suggested by David - #122

Open
ounsworth wants to merge 4 commits into
bcgit:release/0.1.3alphafrom
ounsworth:cleanup/misc_cleanup_from_david
Open

Cleanup/misc cleanup Suggested by David#122
ounsworth wants to merge 4 commits into
bcgit:release/0.1.3alphafrom
ounsworth:cleanup/misc_cleanup_from_david

Conversation

@ounsworth

@ounsworth ounsworth commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Issue Link

closes #104

Summary

The existing SHA2 / SHA3 primitives are exposed at the root of the crate as:
bouncycastle_sha2::{SHA224, SHA256, ..,}

I have now put the hmac and hkdf primitives in sub-mods so as not to clutter the roots of the crates' namespaces.
bouncycastle_sha2::hmac::{HMAC_SHA224, HMAC_SHA256, ..,}
bouncycastle_sha2::hkdf::{HKDF_SHA256, HKDF_SHA512, ..,}
bouncycastle_sha3::hmac::{HMAC_SHA3_224, HMAC_SHA3_256, ..,}

rebase this on top of the current (rolled back) release/0.1.3alpha. Probably the easiest way will be to make a new clean branch and merge in each commit one-by-one.

Scope and Risk

Flips the cargo.toml dependency order so that sha2 / sha3 are the user-facing crates, and hmac / hkdf are utility crates. This could affect some packaging stuff that depends on this.

Validation

Tests and docs updated to match. I manually edited through the doc updates.

AI Usage Statement

Did you use AI in creating this pull request:

  • No
  • Yes, indirectly - no submitted code was generated by AI (e.g., answering questions, performing a review, suggestions, etc.)
  • Yes, trivial code changes were generated by AI (e.g., autocompletion of a single line, reformatting, or spell-checking)
  • Yes, non-trivial code changes were generated by AI

Assisted-by: Claude Code:claude-opus-5

@ounsworth
ounsworth marked this pull request as draft September 9, 2026 04:44
…YLE.md as required reading in a way that allows us to update those without needing to change CLAUDE.md.
…3 crate. This commit was complicated by the fact that SM3 is present on this branch, despite its PR bcgit#89 still being open and not-yet-reviewed, so I decided that it was easier / cleaner to manually delete all of SM3 from this commit rather than refactor it also (since that would basically have become a review of SM3).
@ounsworth
ounsworth force-pushed the cleanup/misc_cleanup_from_david branch from df3b166 to bfe70b6 Compare September 9, 2026 16:01
@ounsworth
ounsworth marked this pull request as ready for review September 9, 2026 16:01
@ounsworth
ounsworth requested a review from dghgit September 9, 2026 16:01
@ounsworth ounsworth changed the title Cleanup/misc cleanup from david Cleanup/misc cleanup Suggested by David Sep 9, 2026
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