🎨 Rename variable

This commit is contained in:
C-3PO 2018-10-07 19:55:40 +02:00
parent d6cb0831fb
commit c2914426af
Signed by: c3po
GPG key ID: 62993C4BB4D86F24

View file

@ -18,11 +18,11 @@ void initDecryptor(uint32_t key0, uint32_t key1, uint32_t key2) {
/** Decrypts the given input in-place. The input buffer will be modified. */ /** Decrypts the given input in-place. The input buffer will be modified. */
void decrypt(uint8_t* chunk, unsigned long length) { void decrypt(uint8_t* chunk, unsigned long length) {
for (unsigned long i = 0; i < length; i += 1) { for (unsigned long i = 0; i < length; i += 1) {
//uint8_t testChar = chunk[i]; //uint8_t curChar = chunk[i];
uint8_t testChar = *(chunk + i); uint8_t curChar = *(chunk + i);
testChar = testChar ^ decryptByte((uint16_t)((uint16_t)(decryptor.key2 & (uint16_t)0xFFFF) | (uint16_t)2)); curChar = curChar ^ decryptByte((uint16_t)((uint16_t)(decryptor.key2 & (uint16_t)0xFFFF) | (uint16_t)2));
updateKeys(&(decryptor.key0), &(decryptor.key1), &(decryptor.key2), testChar); updateKeys(&(decryptor.key0), &(decryptor.key1), &(decryptor.key2), curChar);
//chunk[i] = testChar; //chunk[i] = curChar;
*(chunk + i) = testChar; *(chunk + i) = curChar;
} }
} }