Quote:
Originally Posted by igorsk
Thanks for the sample. I did a little debugging, and apparently the correct calculation looks like this:
|
Hi igorsk,
I've testing the algorithm and this is working right now for me:
Code:
BYTE keybyte;
declen = LengthOfStream
keybyte = (declen % (PsuedoEncryptionKeyByte&0xFF)) + 0x0F;
if ((type == 0x11)||(type == 0x19)||(type == 0x17))
{
if (declen > 0x400) declen = 0x400;
}
for (i = 0; i < declen; i++) {
*(p + i) ^= keybyte;
}
For both books (Ed Lacy) PseudoEncriptionKeyByte = -480 (int);
but -480&0xFF = 32, that`s the correct module for declen.