RxCache icon indicating copy to clipboard operation
RxCache copied to clipboard

use AdvanceEncryptor to fix encrypting cache error

Open ZDZN opened this issue 6 years ago • 1 comments

The RxCache interface methods always load from network when using @EncryptKey and @Encrypt. I thought that it must have an error when encrypting or decrypting the cache data, but when I run the test file, the result was all green. Thus I directly use the Encryptor to encrypt and decrypt file in my testing android project, I found that the BuiltInEncryptor cannot decrypt the data. Finally, I found some information about the encrypt method difference between java platform and android platform. I replace the BuiltInEncryptor with AdvanceEncryptor in RxCacheModule, the new Encryptor can run the correct result on android platform and is also tested in java platform. Now I uses my build in my android project and I hope this pull request can fix this bug. Thank you for your nice library.

ZDZN avatar Sep 27 '19 08:09 ZDZN

It is a working solution, thanks @ZDZN !!! I've created JitPack reference with this fix, use com.github.ultraon.RxCache:runtime:63d5ac1412 until the PR is merged.

ultraon avatar Aug 06 '20 00:08 ultraon