Open wallcwr opened 5 days ago
I will have to change the code to give an error if it comes across encryption if there was no password supplied. Currently it assumes a default empty password and tries that.
The latest commits add a Encrypted field to the FileHeader. There is also two new errors, ErrArchiveEncrypted and ErrArchivedFileEncrypted that can occur if you read an encrypted archive without supplying a password. The first is if the archive headers are encrypted, and in this case you can't even list the files in the archive. The second is for when only the file contents are encrypted, so you cycle through all files (or List) and you will only get that error when trying to read the file contents.
When I use WinRAR to encrypt a file in Windows, I use the following code on Linux to determine whether the file is encrypted. The result returned is that the file is not encrypted. In fact, the file is encrypted.