Anyone found a way to encrypt assets?

I am almost ready to start beta testing a soccer management game that has been in development for 18 months.

http://s952.photobucket.com/user/niksherman/library/Retro%20Football%20Manager

At the moment I have placeholder crowd audio effects ‘borrowed’ from Champ Manager 01/02, which I now need to replace. I am looking into various specialist effects libraries, but all of them say that the sounds cannot be distributed as raw audio files, because then any user could steal the sounds from the resources folder.

I’m at a loss what to do really, short of just having crappy public domain sounds that don’t really fit together and provide an immersive experience.

You can use the OpenSSL plugin to encrypt them and when you need to load them decrypt them to a writable folder (system.temporaryDirectory for instance), play them and maybe delete it when you’re done.

But I think you’re going to suffer performance problems.

Rob

Just had a chance to look into this, and early signs are encouraging.

150K mp3 - read in as string, encode using OpenSSL “aes-256-cbc”, save as text file, read text file as string, decode, save as mp3 to temporary directory, load and play = 19.7ms on Macbook Pro.

13ms of that is loading the final mp3 which I’d be doing any way, and I wouldn’t be doing the encoding section once all the mp3s are encrypted.

Just a shame Corona won’t let me load mp3s with false file extensions for some extra protection.

Cheers for the tip!

You can use the OpenSSL plugin to encrypt them and when you need to load them decrypt them to a writable folder (system.temporaryDirectory for instance), play them and maybe delete it when you’re done.

But I think you’re going to suffer performance problems.

Rob

Just had a chance to look into this, and early signs are encouraging.

150K mp3 - read in as string, encode using OpenSSL “aes-256-cbc”, save as text file, read text file as string, decode, save as mp3 to temporary directory, load and play = 19.7ms on Macbook Pro.

13ms of that is loading the final mp3 which I’d be doing any way, and I wouldn’t be doing the encoding section once all the mp3s are encrypted.

Just a shame Corona won’t let me load mp3s with false file extensions for some extra protection.

Cheers for the tip!