Quote:
What is the easiest way to encrypt files or is there one?
I have purchased a sound pack from Sound Ideas and if I use them I don't
want them stolen by someone.


To answer the question, it involves extra steps and additional work. The
basic encrytion technique is to take the file byte by byte and perform an
XOR with another number to give you the new value. You could run through the
entire file and do, say, XOR 42 with every value. Then to decrypt it all you
have to do is the same operation again. XOR is non-destructive (it's an
Exclusive OR in binary terms).

The problem with this approach is that it's very simple to crack, as there
are only 256 possible values, so you would use a keyword, say BANANA. You'd
then XOR the first character with the ascii code for B (hex 42), the second
with A (hex 41), the third with N and so on.

However if you understand the structure of the header it's easily crackable
because the first 4 characters of a WAV file are always RIFF so you can
figure out the first 4 letters of the keyword. The answer is to use one key
for the header (the first 44 or 46 characters) and a different key for the
data.

Once you've decided on your strategy and have encrypted all the WAV files,
whenever you want to play one you have to load it into memory, decrypt it,
then play it from memory. If it's a large file, loading and decrypting it
will take time and you may notice the delays in your programme.

In short, it's extra work, a hassle to do and may slow down your game. If
it's your own files I can understand you wanting to protect them but if I
can play devil's advocate once again, if Sound Ideas were concerned about
the files being copied they should supply them in an encrypted format with
either an Active X control or source code examples of how to decrypt them in
your programme.

Steve

-------------------------------
Azabat Software: accessible games for visually impaired beginners
Web: www.azabat.co.uk
Email: mailto:[EMAIL PROTECTED]
Tel (UK): 07740 777 364
International: +44 7740 777 364


--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.12/631 - Release Date: 16/01/2007
08:25


_______________________________________________
Gamers mailing list .. [email protected]
To unsubscribe send E-mail to [EMAIL PROTECTED] You can visit
http://audyssey.org/mailman/listinfo/gamers_audyssey.org to make
any subscription changes via the web.

Reply via email to