🎨 Rename variables to use camelCase

This commit is contained in:
C-3PO 2018-10-07 20:00:31 +02:00
parent c2914426af
commit 90f8da28bf
Signed by: c3po
GPG key ID: 62993C4BB4D86F24
2 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,7 @@
#include "decryptUtilities.h"
const uint32_t crc32_tab[] = {
/** Table of all 256 CRC-32 values */
const uint32_t crcTable[] = {
0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f,
0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988,
0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2,
@ -46,8 +47,8 @@ const uint32_t crc32_tab[] = {
0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d
};
uint32_t getCrc(uint32_t old_crc, uint8_t c) {
return (old_crc >> 8) ^ crc32_tab[(old_crc & (uint32_t)0xff) ^ c];
uint32_t getCrc(uint32_t oldCrc, uint8_t c) {
return (oldCrc >> 8) ^ crcTable[(oldCrc & (uint32_t)0xff) ^ c];
}
void updateKeys(uint32_t *key_0, uint32_t *key_1, uint32_t *key_2, uint8_t c) {

View file

@ -45,7 +45,7 @@ void closeCurrentFile() {
//Opens the next file at its beginning.
void openNextFile() {
const size_t fileNameLength = strlen(file.name);
//We need to transfer carry if necessary (e.g. .z09 to .z10), otherwise just increase last digit
//Transfer carry if necessary (e.g. .z09 to .z10), otherwise just increase last digit
if (file.name[fileNameLength - 1] == '9') {
file.name[fileNameLength - 2] += 1;
file.name[fileNameLength - 1] = '0';