Skip to content

fix(hash): fix base64 digest and hash salt#13977

Merged
intellild merged 5 commits into
mainfrom
jin/base64
May 11, 2026
Merged

fix(hash): fix base64 digest and hash salt#13977
intellild merged 5 commits into
mainfrom
jin/base64

Conversation

@intellild

@intellild intellild commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use the base64 crate for standard base64 and unpadded base64url hash digests, replace non-standard implementation
  • write hash salt bytes directly when initializing salted hashes
  • add unit coverage for base64/base64url output and raw-byte salt handling

Validation

  • cargo fmt --package rspack_hash
  • cargo test -p rspack_hash

Note: local commit hooks could not run because pnpm is not available in this environment, so the test commit was created with --no-verify after the Rust validation above.

intellild added 3 commits May 9, 2026 19:27
Use the base64 crate for standard and URL-safe base64 encoding instead of custom implementations. This improves maintainability and reduces potential bugs in the encoding logic.
@github-actions github-actions Bot added the release: bug fix release: bug related release(mr only) label May 9, 2026
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 8a3ff88 to test: split benchmark case entrypoints (#13971) by hardfist

🙈 Size remains the same at 61.92MB

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 6 projects in monorepo, 6 projects with changes.

📊 Quick Summary
Project Total Size Change
popular-libs 1.7 MB -
react-10k 5.7 MB -
react-5k 2.7 MB -
react-1k 826.3 KB -
rome 1.6 MB -
ui-components 4.8 MB -
📋 Detailed Reports (Click to expand)

📁 popular-libs

Path: ../build-tools-performance/cases/popular-libs/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 1.7 MB - -
📄 JavaScript 1.7 MB - -
🎨 CSS 0 B - -
🌐 HTML 289.0 B - -
📁 Other Assets 0 B - -

📁 react-10k

Path: ../build-tools-performance/cases/react-10k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 5.7 MB - -
📄 JavaScript 5.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-5k

Path: ../build-tools-performance/cases/react-5k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 2.7 MB - -
📄 JavaScript 2.7 MB - -
🎨 CSS 21.0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 react-1k

Path: ../build-tools-performance/cases/react-1k/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 826.3 KB - -
📄 JavaScript 826.0 KB - -
🎨 CSS 0 B - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

📁 rome

Path: ../build-tools-performance/cases/rome/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 1.6 MB - -
📄 JavaScript 1.6 MB - -
🎨 CSS 0 B - -
🌐 HTML 0 B - -
📁 Other Assets 0 B - -

📁 ui-components

Path: ../build-tools-performance/cases/ui-components/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 4.8 MB - -
📄 JavaScript 4.7 MB - -
🎨 CSS 106.8 KB - -
🌐 HTML 328.0 B - -
📁 Other Assets 0 B - -

Generated by Rsdoctor GitHub Action

@codspeed-hq

codspeed-hq Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 34 untouched benchmarks
⏩ 25 skipped benchmarks1


Comparing jin/base64 (8a3ff88) with main (81aa0bb)

Open in CodSpeed

Footnotes

  1. 25 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@intellild intellild marked this pull request as ready for review May 10, 2026 03:13

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c17954e558

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/rspack_hash/src/lib.rs Outdated
@intellild intellild requested a review from hardfist May 11, 2026 06:06
@intellild intellild merged commit fa01589 into main May 11, 2026
37 checks passed
@intellild intellild deleted the jin/base64 branch May 11, 2026 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants