Skip to content

feat: introduce encryption result version#48

Closed
mikesposito wants to merge 1 commit into
mainfrom
feat/encryption-result-version
Closed

feat: introduce encryption result version#48
mikesposito wants to merge 1 commit into
mainfrom
feat/encryption-result-version

Conversation

@mikesposito
Copy link
Copy Markdown
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
Copy Markdown
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