Private Sub ZipEncrypt(File_Directory As String, File_name As String, Password As String) As Byte
Private APZ_Serializator As B4XSerializator
Private APZ_Cipher As Cipher
Private APZ_Archiver As Archiver
Private APZ_no As NativeObject
Private wrk_str As String
Private wrk_byte() As Byte
'Zip File_Directory/File_Name to File.DirTemp/tmp.zip
APZ_no.Initialize("SSZipArchive").RunMethod("createZipFileAtPath:withFilesAtPaths:", _
Array(File.DirTemp & "/tmp.zip", File_Directory & "/" & File_name)).AsBoolean
'Read zip back in as string
wrk_str = File.ReadString(File.DirTemp, "tmp.zip")
'Convert string to bytes then encrypt bytes using password
wrk_byte = APZ_Cipher.Encrypt(APZ_Serializator.ConvertObjectToBytes(wrk_str), Password)
Return wrk_byte
End Sub