fix: unify encryption across platforms - #3470
Conversation
37a5d63 to
055685a
Compare
055685a to
0b044d1
Compare
0b044d1 to
0e6ad10
Compare
OmarHatem28
left a comment
There was a problem hiding this comment.
also can we add some tests to this migration, add cases for correct migration and for failed migration, and for writing multiple times together, and reading multiple times together, etc...
| await _writeXChaCha20( | ||
| path: path, | ||
| password: password, | ||
| data: data, | ||
| highEntropyPassphrase: useHighEntropy, | ||
| ); |
There was a problem hiding this comment.
I think we should wrap this in a try/catch, so a failure here won't stop wallet from opening/read from completing
There was a problem hiding this comment.
it shouldn't fail at all and if it does it better do so loudly
There was a problem hiding this comment.
it will not fail loudly, it will just fail to open the wallet silently, and the user will end up with a wallet that can't be opened, and since it passed our tests, so we don't need it to fail loudly, we need it to work, and for any reason the user might have, we shouldn't block him from opening his wallet, we can add another way to check if the migration worked tho, but it will be a bit of a headache
There was a problem hiding this comment.
True, but it can only fail if
- secure random is unavailable (impossible)
- file wasn't written (out of space / wrong permissions)
and even if it fails a fix is a matter of reopening the app after solving the problem. Unless I'm missing something
0e6ad10 to
ab46f8f
Compare
changes in dependencies |
Issue Number (if Applicable): Fixes #
Description
Please include a summary of the changes and which issue is fixed / feature is added.
Pull Request - Checklist