mirror of
https://github.com/SimpleMobileTools/Simple-File-Manager.git
synced 2025-02-16 20:00:36 +01:00
Properly set encryption method when compressing
This commit is contained in:
parent
9a640c802c
commit
caf2788356
@ -46,6 +46,7 @@ import kotlinx.android.synthetic.main.item_file_grid.view.*
|
|||||||
import kotlinx.android.synthetic.main.item_section.view.*
|
import kotlinx.android.synthetic.main.item_section.view.*
|
||||||
import net.lingala.zip4j.io.outputstream.ZipOutputStream
|
import net.lingala.zip4j.io.outputstream.ZipOutputStream
|
||||||
import net.lingala.zip4j.model.ZipParameters
|
import net.lingala.zip4j.model.ZipParameters
|
||||||
|
import net.lingala.zip4j.model.enums.EncryptionMethod
|
||||||
import java.io.BufferedInputStream
|
import java.io.BufferedInputStream
|
||||||
import java.io.Closeable
|
import java.io.Closeable
|
||||||
import java.io.File
|
import java.io.File
|
||||||
@ -652,6 +653,10 @@ class ItemsAdapter(
|
|||||||
|
|
||||||
fun zipEntry(name: String) = ZipParameters().also {
|
fun zipEntry(name: String) = ZipParameters().also {
|
||||||
it.fileNameInZip = name
|
it.fileNameInZip = name
|
||||||
|
if (password != null) {
|
||||||
|
it.isEncryptFiles = true
|
||||||
|
it.encryptionMethod = EncryptionMethod.AES
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user