Skip to content

Conversation

nholik
Copy link

@nholik nholik commented Sep 17, 2025

As outlined in Issue 474, when a cipherKey value is passed in the configuration arguments, instead of using the legacy crypto functionality like in other areas, there is a silent fallback to plaintext as the new design relies on the presence of a defined ICryptoModule. This PR gives a fallback to the legacy encryption methods when a cipherkey is passed in, as this is likely the expectation of users, particularly coming from earlier versions of the library, then passing in this value.

To accomplish this, there are two small changes:

  • Adding a simple adapter that wraps the legacy functions in a compatiable ICryptoModule
  • When a cipherKey is passed in the constructor, the adapter is utilized

@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Sep 17, 2025

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

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

@nholik nholik force-pushed the issue-474-rn-fallback-encryption branch from b9d405e to 1ba888e Compare September 17, 2025 22:42
@nholik nholik force-pushed the issue-474-rn-fallback-encryption branch from 1ba888e to a508cc0 Compare September 18, 2025 11:19
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