[zip] Add ZipReader::SetPassword()
ZipReader can now decrypt encrypted files from ZIP archives. Use password only for encrypted files. Using a non-null password triggers an error for non-encrypted files, even if this password is an empty string. Note that only the legacy ZipCrypto encryption scheme is currently supported. The underlying minizip library does not support the more modern AES encryption schemes. Added tests: ZipReaderTest.EncryptedFile_WrongPassword ZipReaderTest.EncryptedFile_RightPassword ZipReaderTest.ExtractToFileAsync_Encrypted_NoPassword ZipReaderTest.ExtractToFileAsync_Encrypted_RightPassword BUG=chromium:1296838, chromium:953256 TEST=autoninja -C out/Default zlib_unittests && out/Default/zlib_unittests Change-Id: I01ee66e9c5db2181de565fdf1fa0081b6dd4aa7d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3458783 Reviewed-by: Noel Gordon <noel@chromium.org> Commit-Queue: Noel Gordon <noel@chromium.org> Commit-Queue: François Degros <fdegros@chromium.org> Cr-Commit-Position: refs/heads/main@{#970508} NOKEYCHECK=True GitOrigin-RevId: 4e9e01a391947244e4082302c1739807950c6e71
Loading
Please register or sign in to comment