Ferenc 2 Posted January 13, 2022 Hi, Does anybody know a way (component, source code) how we can use password for FMX Android and iOS? I found the TEncryptedZipFile on http://www.uweraabe.de/Blog/2017/05/07/tzipfile-with-password-encryption-part-3/ which worked with RS 10.4. But with RS 11 the created protected zip file cannot be unzipped on another system with a different zip component (VCL), the right password is not right. The component on mobiles can unzip protected files created with another zip component (VCL), it works. 1 Share this post Link to post
Martin Sedgewick 30 Posted January 26, 2022 I have just found this issue with TEncryptedZipFile in Delphi 11 worked in 10.4 with no issue in 11, I cannot unzip using 7zip @Uwe Raabe Is this something you have already noticed or tackled yourself? Share this post Link to post
Uwe Raabe 2057 Posted January 26, 2022 4 hours ago, Martin Sedgewick said: @Uwe Raabe Is this something you have already noticed or tackled yourself? I will have a look ASAP. 1 Share this post Link to post
Uwe Raabe 2057 Posted February 24, 2022 The problem is caused by a change in the TStream.CopyFrom code made in D11. Someone forgot to override TZCompressionStream.GetSize returning -1 to make it work with that change. TZCompressionStream raises "EZCompressionError with message 'Invalid ZStream operation!'" TZCompressionStream.CopyFrom raises SZInvalid Zlib, tZCompressionStream.GetSize() throws an unnecessary exception Fortunately its is said to be fixed in D11.1. For the meantime I added a workaround available in the latest version: https://github.com/UweRaabe/EncryptedZipFile Share this post Link to post
Martin Sedgewick 30 Posted March 4, 2022 Ah fantastic! Sorry I missed this when you originally posted Share this post Link to post
reshup 0 Posted May 19, 2022 (edited) Code-Snippet i got from a friend long ago might be useful ? //From: BoB Team-PEiD Function GetPolyCrc32(Address : Pointer; Size : DWord) : DWord; Asm // input: EAX=data, EDX=size PushAD XChg EAX, EDX // EDX = Address .. XChg EAX, ECX // ECX = Size .. // Mov EDX, Buffer // Mov ECX, NumBytes Xor EAX, EAX // input: EDX=data, ECX=size, EAX=crc // output: EAX=crc, EDX+=ECX, ECX=BL=0 Jecxz @L4 Not EAX @L1: Xor AL, [EDX] Inc EDX Mov BL, 8 @L2: Shr EAX, 1 Jnc @L3 Xor EAX, $EDB88320 @L3: Dec BL Jnz @L2 Loop @L1 Not EAX @L4: Mov [ESP + PushAD_EAX], EAX PopAD End; Edited May 19, 2022 by reshup Share this post Link to post