You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(Encrypt): Introduce EncryptUtils for common logic
This commit introduces a new `EncryptUtils` object to centralize common encryption and decryption logic previously duplicated across different encryption algorithm implementations (`AESEncrypt`, `DESEncrypt`, `DESedeEncrypt`). The core file processing and progress reporting functionalities have been moved into this utility class.
**Key Changes:**
1. **`EncryptUtils` Creation:**
* A new object, `EncryptUtils`, has been created to house the shared logic for encrypting and decrypting files.
* It contains the methods `encryptFile` and `decryptFile`, which handle `InputStream` processing, progress reporting, and `Cipher` operations.
2. **Refactoring of Encryption Classes:**
* `AESEncrypt.kt`, `DESEncrypt.kt`, and `DESedeEncrypt.kt` have been refactored to delegate their `encryptFile` and `decryptFile` calls to the new `EncryptUtils`.
* This removes significant code duplication from each class, simplifying them to primarily manage algorithm-specific configuration.
**Version Update:**
* The project version in `gradle.properties` has been incremented from `1.1.88` to `1.1.89`.