Codebase list libcryptx-perl / b8bf151
crc32 cosmetics Karel Miko 7 years ago
1 changed file(s) with 4 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
171171 h = hash;
172172 crc = ctx->crc;
173173 crc ^= _CRC32_NEGL;
174
175 if (size > 4) size = 4;
174176 for (i = 0; i < size; i++) {
175 h[size-i-1] = ((unsigned char*)&(crc))[i];
177 h[i] = ((unsigned char*)&(crc))[size-i-1];
176178 }
177179 }
178180
182184 return CRYPT_NOP;
183185 #else
184186 const void* in = "libtomcrypt";
185 const unsigned char crc32[] = { 0xef, 0x76, 0x73, 0xb3 };
187 const unsigned char crc32[] = { 0xb3, 0x73, 0x76, 0xef };
186188 unsigned char out[4];
187189 crc32_state ctx;
188190 crc32_init(&ctx);