i have archives (rar and zip) that are password protected. when i try to "extract" them with a wrong password the output folder is created and "something" is extracted to the output folder but the output files are broken. The output files have the same file size then the files within the archive and the process takes the same time then extracting with the correct password. also when i try to extract the archive without a password this happens. is there a function to check whether the archive is password protected or the password i try is the correct one without to extract the archive?
i can remember this doesn't happen every time. some archives fail because of wrong password without extracting it. but i can't find any example on my computer it just remember to such archives.
There are several possible combinations of encryption/compress methods.
Some of these combinations allow to detect wrong password before extraction.
And how can i detect that? The only way i found was to use an wrong password and read out the error code. This works also here but after extracting the archive.