Reputation: 2499
I have a problem in distributing an application. I need to distribute with my application some data, and in order to preserve it, I'd like an in-file filesystem, portable across platforms, and encrypted.
Basically, I'd like to load these files at runtime, as comfortably as possible, for instance iterating over directories.
I could use zlib
, but even an encrypted archive can be analyzed without passwords: I can see inside the zip, but not extract files, and I'd like to avoid that.
Any hints?
Upvotes: 0
Views: 320
Reputation: 6046
AFAIK the "regular" Zip doesn't have the option to encrypt the file names.
7-zip (LZMA) has such an option, so you might try to look into that direction. Not sure if there is a portable VFS (Virtual File System) implementation though, as it is the case for zlib (you can check here: https://github.com/figment/JA2-1.13/tree/master/Build/ext/VFS)
Alternatively, you could "encrypt" the file names on your own in the application (i.e. the file names would be inserted encrypted in the archive, and the app would decrypt them transparently). But the 7-zip advantage is, that if the filenames are encrypted, it will not list anything at all without providing the correct password.
Another possibility might be to use a TrueCrypt file container (I'm not aware of any SDK though, but there is the complete TrueCrypt source code available, so I imagine it should be possible to integrate it within an app with some effort).
Upvotes: 1