mirror of
				https://github.com/SimpleMobileTools/Simple-File-Manager.git
				synced 2025-06-05 22:09:15 +02:00 
			
		
		
		
	Properly set encryption method when compressing
This commit is contained in:
		| @@ -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 { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user