2016-09-19 18:55:28 (edited by Hrvoje 2016-11-21 09:56:03)

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!

2016-09-20 12:58:49

Hello again.
So, after posting a topic on libaudioverse mailing list, I was able to get solution which is easy and works perfectly. Now you can use this code to pack and encrypt data files in your Python games, but keep in mind that this code assumes that you're using Libaudioverse.
If you make any modifications or improvements, please share it with me.
The new link is: https://dl.dropboxusercontent.com/u/407 … ryption.7z

2016-10-12 10:44:47

Hrvoje,
It would be awesome if you packaged this up into something on pip for both the case with and without libaudioverse.
I'm sure it would help a lot of people who were getting started with audiogame development in Python.

Related: we need a centralized place for tracking all the various resources that are out there from Libaudioverse, AO2, etc. etc. as well as stuff like Cam's recent thread on advice for Pyglet and the shadow window.

2016-10-12 10:45:49

Also, thanks for building this!

2016-10-12 14:11:09

OK, I'll think about converting my code into python package. But first, I have to reorganize the code to make it better for use and maintenance.

2016-11-16 22:54:31

Hi,
could you please re-upload this? I am having trouble figuring out how to encrypt, and I feel this could help with my purposes.
Thanks.

If you have issues with Scramble, please contact support at the link below. I check here at least once a day, so this is the best avenue for submitting your issues and bug reports.
https://stevend.net/scramble/support

2016-11-21 09:56:49

Hello,
I've updated first post with a new link. Sorry for that.