Larger Encryptions
by Scott Doerrfeld · in General Discussion · 06/08/2007 (1:37 pm) · 3 replies
I've been looking at different ways to implement encryptions in torque. This resource provides a method which I would like to use, the problem is that it only shows the method for implementing an 8-bit encryption which provides an easily breakable encryption. I was wondering if anyone knows how to increase the size of this encryption to 32-bits or higher. The resource is:
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7253
It looks like I am running into trouble in this section:
XORStream::encrypt( const U32 size, const void *in, void *out )
{
for( int i = 0; i < size; i++ )
((U8 *)out)[i] = ((U8 *)in)[i] ^ mKey;
Is there a good way to alter this to support a higher bit-encryption?
Thanks
http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=7253
It looks like I am running into trouble in this section:
XORStream::encrypt( const U32 size, const void *in, void *out )
{
for( int i = 0; i < size; i++ )
((U8 *)out)[i] = ((U8 *)in)[i] ^ mKey;
Is there a good way to alter this to support a higher bit-encryption?
Thanks
About the author
Torque 3D Owner Aaron Torpy
You may find this useful:
efgh.com/software/rijndael.htm
On that page is C/C++ source code for an implementation of the Rijndael Advanced Encryption Standard , which uses 256-bit keys.
Cheers,
Aaron.