Skip to content

[PM-21377] Add missing purecrypto functions #267

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

Merged
merged 3 commits into from
May 9, 2025
Merged

Conversation

quexten
Copy link
Contributor

@quexten quexten commented May 8, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-21377

📔 Objective

Add remaining missing functions needed to port encrypt service to sdk.
Ref: https://github.com/bitwarden/clients/blob/87a1f4e8ac928edfb05a283372550d0792c71827/libs/common/src/key-management/crypto/abstractions/encrypt.service.ts#L105-L188

Note: The way that this uses the key context is not ideal, but this should not be handled in this PR. This PR is to make the public interface available to unblock clients changes. Follow-up work (such as #221) can expose better apis from bitwarden-crypto and move PureCrypto to it.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation
    team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

Copy link
Contributor

github-actions bot commented May 8, 2025

Logo
Checkmarx One – Scan Summary & Details2d8d1cea-792a-42dd-83ee-07a13611f8e4

Great job, no security vulnerabilities found in this Pull Request

Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 94.54545% with 9 lines in your changes missing coverage. Please review.

Project coverage is 69.81%. Comparing base (90c331a) to head (1e0bd41).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
crates/bitwarden-wasm-internal/src/pure_crypto.rs 94.54% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #267      +/-   ##
==========================================
+ Coverage   69.56%   69.81%   +0.25%     
==========================================
  Files         213      213              
  Lines       16644    16809     +165     
==========================================
+ Hits        11578    11735     +157     
- Misses       5066     5074       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

sonarqubecloud bot commented May 8, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@quexten quexten changed the title Add missing purecrypto functions [PM-21377] Add missing purecrypto functions May 8, 2025
@quexten quexten marked this pull request as ready for review May 8, 2025 17:33
@quexten quexten requested a review from a team as a code owner May 8, 2025 17:33
@quexten quexten requested a review from coroiu May 8, 2025 17:33
Copy link
Contributor

@coroiu coroiu left a comment

Choose a reason for hiding this comment

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

@quexten do we wanna document these functions maybe? I understand that they are temporary, but still

@quexten
Copy link
Contributor Author

quexten commented May 9, 2025

@coroiu Good point, follow-up PR with docs is here: #268

@quexten quexten merged commit 5449a5a into main May 9, 2025
45 checks passed
@quexten quexten deleted the km/purecrypto-functions branch May 9, 2025 10:36
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.

2 participants