evolution-gaming/crypto

Return lenient default behaviour for DecryptConfig

migesok opened this issue · 0 comments

Before the changes done in #23 DecryptConfig default behaviour was lenient towards exceptions - it swallowed any failure and returned the given password value as it is.

After the PR the default behaviour changed to a strict one - if the encryptedPasswords flag is set, a password must be decrypted correctly or an exception is going to be thrown.
Turns out there are apps in our codebase which depend on the lenient behaviour and it's hard to fix it in all the places.

The proposal is to return the lenient behaviour by default with possibility to have the strict one as well. Probably the method pointing to the lenient behaviour can be marked as deprecated.