Skip to content
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

feat: introduce encryption result version #48

Closed
wants to merge 1 commit into from

Conversation

mikesposito
Copy link
Member

This PR introduces a version property in the EncryptionResult object. Adding a version to the encryption result object allows the use of different decryption algorithms or configurations based on it.

The current implementation (prior to this PR) is classified as version 1.0, and for EncryptionResult objects that don't have a version property at all, version 1.0 is inferred: this ensures that the decryption methods of this library can still decrypt old versions.

Moreover, this PR also adds a 2.0 version, where the encryption key is derived with increased iterations.

When encrypting, it is now possible to specify the version (defaults to 2.0).

Changes

  • BREAKING: Added iterations optional argument to keyFromPasswordwith 600000 as default value
  • CHANGED: Added optional version argument to encryptWithDetail with 2.0 as the default value
  • CHANGED: Added optional version argument to encryptWithKey with 2.0 as the default value

@mikesposito
Copy link
Member Author

Closed in favor of #49

@mikesposito mikesposito closed this Nov 6, 2023
@mikesposito mikesposito deleted the feat/encryption-result-version branch November 7, 2023 09:43
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.

1 participant