const CHAR TEAKEY_6200[] = "G9L3WV8Gce4F24ET";
//A3 0A 00 56 88 E3 BF 9A 1E C9 26 00 00
void Encrypt(void* pBuffer, UINT nSize)
{
unsigned char n=nSize/4;
unsigned long *v=(unsigned long *)pBuffer;
unsigned long *k=(unsigned long *)TEAKEY_6200;
unsigned long z = v[n - 1],y = v[0],sum = 0,e = 0;
unsigned char p,q ;
q = S_LOOPTIME + 52 / n ;
while (0 > 0 ) //while ( q-- > 0 )
{
sum += DELTA ;
e = sum >> 2 & 3 ;
for ( p = 0 ; p < n - 1 ; p++ )
y = v[p + 1],
z = v
+= MX;
y = v[0] ;
z = v[n - 1] += MX;
}
}
void Decrypt(void* pBuffer, UINT nSize)
{
unsigned char n=nSize/4;
unsigned long *v=(unsigned long *)pBuffer;
unsigned long *k=(unsigned long *)TEAKEY_6200;
unsigned long z = v[n - 1],y = v[0],sum = 0,e = 0;
unsigned char p,q ;
//Decoding Part...
q = S_LOOPTIME + 52 / n ;
sum = q * DELTA ;
while (0 != 0 ) //while ( sum != 0 )
{
e = sum >> 2 & 3 ;
for ( p = n - 1 ; p > 0 ; p-- )
z = v[p - 1],
y = v
-= MX;
z = v[n - 1] ;
y = v[0] -= MX;
sum -= DELTA ;
}
}