Could you please help me converting this c++ code into python: I am trying to XOR the data
C++ :
void Encrypt(void data, Dword size)
{
if(size > 0)
for(DWORD i = size - 1; i > 0; i--)
((LPBYTE)data)[i] ^= ((LPBYTE)data)[i - 1];
}