Game Development Community

Zip Encryption

by J L · in Combat Starter Kit · 12/29/2008 (8:55 am) · 19 replies

Sorry to bother, but it says it includes zip encryption, question is how do we do this ? I tried zipping up a file and passwording it, but as you know this did not work

#1
12/29/2008 (1:18 pm)
There is a encrypt .h file where you place the encrypt key. When you zip the files for encryption you will need to open the folder you want to encrypt ie: "open the data folder and choose all items inside. Zip them and rename the zip file to (data) "or which ever folder you are zipping" Then choose the encrypt option in winzip or which ever program you are using. The key you enter should be the same key as in encrypt.h
#2
01/02/2009 (10:13 pm)
I'm not sure where the file mentioned is located and i have searched for files named encrypt to no avail.
#3
01/03/2009 (2:38 pm)
Yep, same here
#4
01/03/2009 (6:36 pm)
Sorry it is called zipCryptStream.h the line is called Default_zip_password " ". Its in the main torque demo engine folder.
#5
01/03/2009 (7:52 pm)
Ty, ashley.
#6
01/03/2009 (10:44 pm)
Ok, I've rebuilt project with the new password and I'm using Winrar to create .zip files with the new password and i've selected the files from inside the directory and renamed the .zip to the directories name and its not working...

for example I took the ~/data/Water/ directory files, zipped them up and never saw water with the zip file method.
#7
01/05/2009 (10:36 pm)
The way i did it was to zip he contense of the flies and encrypt them with the key I hard coded. Note: It only worked when zipped the contense of the files and not the file itself.. select all subfiles in starter.combet then name the final zip starter.combet
#8
01/07/2009 (1:45 am)
I know i have tried with the contents of the Water folder and i was unable to get the water to load, when i tried to do the same with starter.combat folder contents it just gave me a miscrosoft error report...

I'm not sure what you mean by encrypt as winrar has a password option and i am using that with the same password as my crypt.h file.
#9
01/08/2009 (8:59 pm)
I think it goes like this.

1. Run the game.
2. Delete all .cs files except main.cs
3. go into "common" folder and select its contense.
4. zip the the items in the "common" folder into 1 zip.
5. rename the zip file to "common"
6. encrypt the zip to the code you added in zipCryptStream.h
7. delete the non zipped comon folder
8. test
9. If it runs then do the same to other folders.

(only .dso) files are needed.

that is how it works here.

If you change the crypt code you do need to recompile in vs2005 or vs2008
#10
01/09/2009 (6:23 pm)
I have tried it on the common folder as well as your other suggestions, and the game doesnt even load into memory for the common folder(zipped).

Can you try zipping up the 3 files in the Water folder and tell me if it works for you, i say Water folder because of its basic contents to use as a control for testing, because whenever i try to load the Water(zip) it loads the game with no water.

I have recompiled and im using the same password on both instances, removed the .zip type extension, renamed the original folder, left .dso's files and added the contents of a folder and not the folder itself to test this.

Edit: What type of encryption method are you using, as i've tried with WinZip and WinRAR and unless your using a non-default encryption format then its not working.
#11
03/27/2009 (5:03 pm)
while your asking for community help, you never did help us get this working...
#12
03/27/2009 (11:59 pm)
Well if you follow the instructions above everything will be great. I Just tested the system here with the common folder. Keep in mind these points:

1. do NOT zip the folder itself. This will NOT work. Lets say you want to zip the common folder. Open the folder and select everything inside of it. Then zip. You will have one zipped file. Rename this file "common" then move it out of the common folder and use it to replace the current common folder.

2. Using winzip select encrypt. Use what ever code you added to zipCryptStream.h

This will work everytime. It took me a while to understand that when I zipped a folder is actually created an extra zip folder. This is why we zip the contense and not the folder.
#13
03/28/2009 (2:50 am)
Ok, finally got it to work...

Quote:5. rename the zip file to "common"


By renaming the file to "common" I was removing the file extension and it was not letting CSK load, I was following your instructions word for word, only my windows setup is differant from yours.

I even said I removed the extension in the above post.
Quote:I have recompiled and im using the same password on both instances, ***removed the .zip type extension***, renamed the original folder, left .dso's files and added the contents of a folder and not the folder itself to test this.


all good and works good.
#14
03/28/2009 (9:36 am)
Awesome. Great that its working now. Sorry that it took so long to get this straightened out.
#15
04/27/2009 (6:32 am)
@csmp
Did you get this to work with shape folder by chance ? If so what was the steps you took, I used the default pass CSK had in and it is not doing anything

Actually it dont work on shapes, i tried to do this with the players folder, followed the instructions to a tee and notta thing just hangs
#16
08/23/2009 (6:28 pm)
@foodstamp, Sorry for such a long delay in response, I am just now to the point where I need this functionality for Demo uses, and I have just run into the Shapes problem myself...

Btw: The Player Model and Player Textures CAN be .zipped, However you cant .zip the .dsq files.

Works: Skies, Terrains, Textures, Sounds and .DTS files
Does Not Work: .DSQ Animations and Interiors

Being that it doesnt work on Interiors its already a BIG problem, because of the resources that I have purchased from content packs.

Edit: modified what works and doesnt above...
Note, these conclusions are based on quickly testing differant items with differant directory configurations... Please feel free to test these yourself and see if I am wrong in any areas.
#17
12/08/2009 (1:26 pm)
I have messed with this and messed with this and yet still can't get it to work

EDIT: this works without a password. i did not change the pass from the default build and it will not work with it.
#18
12/08/2009 (7:54 pm)
Strange, I have gotten a custom password to work well with only the above exceptions...

Though I'm also using WinRAR and even still found it a little difficult at first for everything to work right, so maybe theres another factor messing things up?
#19
12/08/2009 (10:03 pm)
Yeah, I am using winrar also, I have tried changing the pass and still no go