Hello all,
Well, in BGT we have the ability to pack and encrypt sounds for security reasons. Well, I wanted to get the same with Python, so for two days I was googleing and playing around with file encryption and decryption in Python with pycrypto. Basically, what I wanted to achieve is as follows:
1. Put all wave files and other game data files inside a zip file.
2. Encrypt the zip file so cheeters cannot modify game data, and also to prevent users from modifying sound files.
3. When the game needs access to sounds and other secret data, decrypt the zip file with previously set encryption key, but data from decrypted zip must be extracted and accessed from within computer's ram, not from a hard drive, again to prevent users from accessing data inside a package.
Fortunately, I was able to achieve all of that, and here's the result (coded in Python 2.7): https://dl.dropboxusercontent.com/u/407 … _packer.py
For this code to work, you need Python27, Libaudioverse 0.9A7, and PyCrypto. LAV and I think PyCrypto are both available on pip.
Anyway, at the link above is entire code that I was working on for two days, so please give any feedback regarding security, speed and loading packed sound data:
Thanks!
Pages 1