-
-
Save hasherezade/781c18d902bbba023cef6a272c0b0624 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void lockcrypt::level1_crypt(void *buf, size_t buf_size, void *key, size_t key_size) | |
{ | |
size_t dwsize = buf_size >> 2; | |
for (size_t i = 4, k = 0; i < buf_size - 6; i += 2, k +=4) { | |
if (k > KEY_SIZE) { | |
k = 0; | |
} | |
DWORD *dwlist = (DWORD *) ((ULONGLONG)buf + i); | |
DWORD *keydw = (DWORD *) ((ULONGLONG)key + k); | |
DWORD inp = *dwlist; | |
DWORD out = inp ^ (*keydw); | |
(*dwlist) = out; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment