RC4 is pretty good too.  This function will do it for you:

void RC4(Char* sIn, UInt32 iInLen, Char* sKey, UInt32 iKeyLen) {

 UInt8* inp = (UInt8*)sIn;
 UInt8* key = (UInt8*)sKey;

 UInt8 s[256];
 UInt8 k[256];
 UInt32 i;
 UInt32 j;
 UInt8 temp;
 UInt32 t;
 UInt32 x;

 for (i = 0; i < 256; i++) {
  s[i] = (UInt8) i;
 }

 j = 0;

 for (i = 0; i < 256; i++) {
  k[i] = key[j++];
  j %= iKeyLen;
 }

 j = 0;

 for (i = 0; i < 256; i++) {
  j = (j + s[i] + k[i]) % 256;
  temp = s[i];
  s[i] = s[j];
  s[j] = temp;
 }

 i = 0;
 j = 0;

 for (x = 0; x < iInLen; x++) {
  i = (i + 1) % 256;
  j = (j + s[i]) % 256;
  temp = s[i];
  s[i] = s[j];
  s[j] = temp;
  t = (s[i] + s[j]) % 256;
  inp[x] ^= s[t];
 }
}

"Aaron Ardiri" <[EMAIL PROTECTED]> wrote in message
news:95953@palm-dev-forum...
>
> > thanks a lot..
> > may i know just one more information , like what is
> > the best custom way to provide custom encryption to my
> > pdbs. any link or some info would be of great help.
>
> you could just XOR your data with 0xaa or so :) that'll
> mess it up :) just dont publish your technique, and, i
> doubt anyone will bother trying to figure it out :)
>
> --
> Aaron Ardiri
> CEO - CTO
> Mobile Wizardry
> http://www.mobilewizardry.com/
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to