Skip to content

feat(plugin-encryption): enhance encryption internal plugin to support encryption of binary data#4756

Open
nishantmc-test wants to merge 2 commits intowebex:nextfrom
nishantmc-test:decrypt_2
Open

feat(plugin-encryption): enhance encryption internal plugin to support encryption of binary data#4756
nishantmc-test wants to merge 2 commits intowebex:nextfrom
nishantmc-test:decrypt_2

Conversation

@nishantmc-test
Copy link
Contributor

This pull request addresses

Providing support to encrypt binary data. Inputs are kmsKeyUri and binary data.

by making the following changes

Added new method encryptBinaryData in encryption.js.

Change Type

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Tooling change
  • Internal code refactor

The following scenarios were tested

Unit test
image

< ENUMERATE TESTS PERFORMED, WHETHER MANUAL OR AUTOMATED >

The GAI Coding Policy And Copyright Annotation Best Practices

  • GAI was not used (or, no additional notation is required)
  • Code was generated entirely by GAI
  • GAI was used to create a draft that was subsequently customized or modified
  • Coder created a draft manually that was non-substantively modified by GAI (e.g., refactoring was performed by GAI on manually written code)
  • Tool used for AI assistance (GitHub Copilot / Other - specify)
    • Github Copilot
    • Other - Cursor
  • This PR is related to
    • Feature
    • Defect fix
    • Tech Debt
    • Automation

I certified that

  • I have read and followed contributing guidelines
  • I discussed changes with code owners prior to submitting this pull request
  • I have not skipped any automated checks
  • All existing and new tests passed
  • I have updated the documentation accordingly

Make sure to have followed the contributing guidelines before submitting.

@nishantmc-test nishantmc-test requested a review from a team as a code owner March 6, 2026 18:59
@arun3528 arun3528 added the validated If the pull request is validated for automation. label Mar 6, 2026
Copy link

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

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: f806de3cda

ℹ️ 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".

*/
encryptBinaryData(kmsKeyUri, data, options) {
return this.getKey(kmsKeyUri, options).then((k) =>
ensureBuffer(data).then((buffer) =>

Choose a reason for hiding this comment

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

P1 Badge Convert non-Buffer inputs before encrypting binary data

encryptBinaryData() documents support for Buffer|ArrayBuffer|Blob|File, but it passes data straight into ensureBuffer(), which only accepts Buffer-like objects (constructor.isBuffer). In browser paths where callers naturally provide Blob, File, or ArrayBuffer, this method will reject with `buffer` must be a buffer and never encrypt, so the new feature does not work for the documented binary input types.

Useful? React with 👍 / 👎.

@nishantmc-test
Copy link
Contributor Author

Vidcast demoing the manual test: https://app.vidcast.io/share/c9427663-bf97-4875-ab4b-4d25d71d6993

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

Labels

validated If the pull request is validated for automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants