GithubHelp home page GithubHelp logo

Zip with password not work. about zip HOT 9 OPEN

pethanihiten avatar pethanihiten commented on June 10, 2024 5
Zip with password not work.

from zip.

Comments (9)

Jeehut avatar Jeehut commented on June 10, 2024

Same issue here ... seems to be a known issue, see #210.

from zip.

alrocha avatar alrocha commented on June 10, 2024

I have tested the code and it seems like it works fine, try this test.

func testZipWithPassword() throws {
        let imageURL1 = url(forResource: "3crBXeO", withExtension: "gif")!
        let sandboxFolder = try autoRemovingSandbox()
        let zipFilePath = sandboxFolder.appendingPathComponent("archive.zip")
        try Zip.zipFiles(paths: [imageURL1], zipFilePath: zipFilePath, password: "Images", progress: nil)
        XCTAssertTrue(FileManager.default.fileExists(atPath: zipFilePath.path))
        XCTAssertThrowsError(try Zip.unzipFile(zipFilePath, destination: sandboxFolder, overwrite: true, password: "Imagess", progress: nil))
        try Zip.unzipFile(zipFilePath, destination: sandboxFolder, overwrite: true, password: "Images", progress: nil)
        XCTAssertTrue(FileManager.default.fileExists(atPath: sandboxFolder.path))
    }

from zip.

gongzhang avatar gongzhang commented on June 10, 2024

Comfirmed the output zip file cannot be unzipped using BetterZip or builtin Archive Utility on latest macOS.

// run on physical iOS device
// package version: 2.1.0
try Zip.zipData(archiveFiles: archiveFiles, zipFilePath: fileUrl, password: "foobar", compression: .DefaultCompression, progress: nil)

However, the contents (filenames and modification dates) of the zip file can be displayed in BetterZip.

from zip.

kattaliraees avatar kattaliraees commented on June 10, 2024

Same issue here. Zip created with password can't be unzipped using the same password in macOS. However it can be unzipped using the unzip function by passing the password

from zip.

evgzor avatar evgzor commented on June 10, 2024

The same, however possible to use https://online.b1.org/online

from zip.

stevenamani avatar stevenamani commented on June 10, 2024

I am also having this issue with password protected archives; they can't be opened in macOS or Windows. Anyone know of any other Zip libraries? I tried using SSZipArchive but that also has issues.

from zip.

evgzor avatar evgzor commented on June 10, 2024

I am using b1 free archiver for unpacking... or 7.zip - very old version for windows

from zip.

startover205 avatar startover205 commented on June 10, 2024

I think it's the same issue as stated for #15
Zip uses AES-256 encryption by default. But Finder, the standard Apple unarchiver, and many unarchivers do not support AES-256. The archive should open just fine with something like The Unarchiver or Keka.

from zip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.