First of all, that was just an example of concept...
>Could the program edit the files once they are in the archive?
You could do that. It might be easier to extract the files, edit them, then re-archive them.
>Can you archive folders also?
You could do that. The more features you add, the more coding it would take.
>And, am I able to open the files that same way as before. Like could I do something simple like this the same way:
>OPEN "archive.tmp/user/program/uses.txt" FOR INPUT AS #1
Using the method I demonstrated: No. If you wanted to "open" the file without extracting it first, you would basically have to write your own file i/o functions to work within your archive format.
Windows has built in partial support for .zip files, but I don't know if it allows you to open them in a way similar to that.
I don't know if you are the kind of person who likes to reinvent the wheel, or if you would rather use existing code. If you want to try reimplementing the .zip format, there are links to different versions of the specifications in the External Links section of the Wikipedia page:
If you would rather use existing code, you could probably use the .DLLs that are part of the open source 7-Zip program. 7-Zip supports both 7z and zip, and also AES encryption. 7-Zip is licensed as LGPL.
They have a public domain SDK, but it seems to be only a subset of that functionality:
Also, be advised that the Windows API provides cryptographic functions, but I don't know how suitable they are.
Also, this might be suitable for AES and/or SHA:
|Response Title||Author and Date|
|more...||on May 23|