Skip to content

crypto-updates - #533

Open
mohitpubnub wants to merge 15 commits into
masterfrom
CLEN-3833-remove-cryptojs
Open

mohitpubnub wants to merge 15 commits into
masterfrom
CLEN-3833-remove-cryptojs

Conversation

@mohitpubnub

@mohitpubnub mohitpubnub commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

refactor(crypto-library): Remove bundled CryptoJS.

Replaced the bundled CryptoJS with native crypto on web, Node.js and noble on React Native.

BREAKING CHANGES: Web: encrypt()/decrypt() now return Promises, and encryption needs crypto.subtle (HTTPS or localhost). Runtimes without it, such as tvOS TVMLKit, can no longer encrypt or decrypt.
React Native: encrypt()/decrypt() now return Promises. Apps using cipherKey must install @noble/ciphers, @noble/hashes and react-native-get-random-values.

feat: support for aes gcm type decryption

add support for aes gcm type decryption by adding cryptor with decryption capability.

…or encrypt and decrypt to be MaybePromise because a custom cryptor can still be syncronous as per user wish,

updates publish, subscribe, fetchMessages, history apis to handle encryption,decryption with async methods with the help of prepare and promise.all.
added utility bytes.ts for one common place for required bytes operation across the apis.
updated node crypto module to use its prmitive and same for the web cryptomodule for crypto.subtle use.
noble for react native platform, added as optional peer dependency.
@pubnub-snyk-universal-prd

pubnub-snyk-universal-prd Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@mohitpubnub mohitpubnub added priority: medium This PR should be reviewed after all high priority PRs. type: feature This PR contains new feature. labels Nov 4, 2026

This branch has not been deployed

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

Labels

priority: medium This PR should be reviewed after all high priority PRs. type: feature This PR contains new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant