Try Apache implementation of ZipFile instead
Docs: https://commons.apache.org/proper/commons-compress/ Related StackOverflow post: https://stackoverflow.com/a/54236244/4421500 Related to #9438 (cherry picked from commit c623258e8c289ecebb2a673fd118686ab56bd0bd) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt
This commit is contained in:
@@ -146,10 +146,12 @@ object CbzCrypto {
|
||||
return decrypt(securityPreferences.sqlPassword().get(), ALIAS_SQL).toByteArray()
|
||||
}
|
||||
|
||||
/** Function that returns true when the supplied password
|
||||
* can Successfully decrypt the supplied zip archive */
|
||||
// not very elegant but this is the solution recommended by the maintainer for checking passwords
|
||||
// a real password check will likely be implemented in the future though
|
||||
/**
|
||||
* Function that returns true when the supplied password
|
||||
* can Successfully decrypt the supplied zip archive
|
||||
* not very elegant but this is the solution recommended by the maintainer for checking passwords
|
||||
* a real password check will likely be implemented in the future though
|
||||
*/
|
||||
fun checkCbzPassword(zip4j: ZipFile, password: CharArray): Boolean {
|
||||
try {
|
||||
zip4j.setPassword(password)
|
||||
|
||||
Reference in New Issue
Block a user