Skip to content

Commit ef92a25

Browse files
committed
Added upgrading notes
1 parent ffa72d1 commit ef92a25

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,25 @@ This exception gets thrown when a key could not be generated or when a message c
6767

6868
This exception gets thrown when there has been suspected tampering with messages. This exception should be handled like the message has been tampered with and precautions should be taken.
6969

70+
## Upgrading
71+
72+
When upgrading from from v1* to v2* of this library there are breaking changes.
73+
74+
It's not possible anymore to generate a new key or encrypt data using the obsolete `CodeCollab\Encryption\Defuse\Key` and `CodeCollab\Encryption\Defuse\Encrypt` classes.
75+
76+
The `CodeCollab\Encryption\Defuse` package has been superseded by the ``CodeCollab\Encryption\Defusev2` package.
77+
78+
Decrypting of data is still possible using the deprecated `CodeCollab\Encryption\Defuse\Decrypt::decrypt()` method and will be for the foreseeable future.
79+
80+
It is however *strongly* advised to re-encrypt old data using the new `CodeCollab\Encryption\Defusev2` package.
81+
82+
The workflow for this will be:
83+
84+
- Generate a new key using the new `CodeCollab\Encryption\Defusev2\Key::generate()` method (**But don't overwrite the current key yet!**)
85+
- Decrypt the data using the current key and the `CodeCollab\Encryption\Defuse\Decrypt::decrypt()` method
86+
- Encrypt the data using the new `CodeCollab\Encryption\Defusev2\Encrypt::encrypt()` method with the newly generate key
87+
- Newly encrypted data can now be decrypted using the new `CodeCollab\Encryption\Defusev2\Decrypt::decrypt()` method
88+
7089
## Contributing
7190

7291
[How to contribute][contributing]

0 commit comments

Comments
 (0)