crc

Python data/file Crc

I am wanting to generate and store a CRC (or similar) value for a given list of files which can be used as a comparison at a later point. Writing a function to do this is simple enough, but is there a more standard way to do it within the Python libs? The value generated does not need to be of any particular standard. ...

How to Calculate CRC8 in Java

I have a binary String of "011001000010100100100010001000100100100100", how do I calculate CRC8? Thanks ...

Shorter GUID using CRC

Hi, I am making a website in ASP.NET and want to be able to have a user profile which can be accessed via a URL with the users id at the end. Unique identifier is obviously a bad choice as it is long and (correct me if i am wrong) not really URL friendly. I was wondering if i produced a unique idnetifier on the ASP page then hashed it ...

Should I use CRC-16 or IP checksum (RFC1071) for an embedded application?

I'm writing an embedded application on an ARM7 processor and I need some form of checksum for data that I'm sending over a serial link as well for data that I'm storing in the flash. I was wondering which of the two CRCs would be better suited for the purpose. The main trade-off are code speed versus robustness. Should I consider anoth...

Error Detection Effiency (CRC, Checksum, etc)

I have a hypothetical situation of sending data units, each of a thousand bytes. Failure rate is rare but when a error does occur it is less likely to be a single bit error and more likely to be an error in a few bits in a row. At first I thought of using a checksum, but apparently that can miss bit errors larger than a single bit. A pa...

Performance of Computing CRC

#include "windows.h" #include <string> #include <iostream> unsigned long crc32_table[] = { 0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA, 0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3, 0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988, 0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91, 0x1DB71064, 0x6AB020F2, 0xF3B9714...

Reversing CRC32

I'm looking for a way to reverse a CRC32 checksum. There are solutions around, but they are either badly written, extremely technical and/or in Assembly. Assembly is (currently) beyond my ken, so I'm hoping someone can piece together an implementation in a higher level language. Ruby is ideal, but I can parse PHP, Python, C, Java, etc. ...

CRC32 Collision

I am trying to find a collision between two messages that will lead to the same CRC hash. Considering I am using CRC32, is there any way I can shorten the list of possible messages I have to try when doing a brute force attack? Any links to websites with hints on this will be helpful. I already have a brute force algorithm that will do...

Python way to do crc32b

Hi all! As i posted as title, there is a way to use the crc32b hash on python natively or through a library (i.e. chilkat)? My intention is to "translate" a program from php to python, so output should be same as in php: $hashedData= hash('crc32b',$data); -> Edit: in a win32 system Thanks to all ;) ...

protect c++ output file(pe file) from editing using crc

How to protect c++ output file(pe file) from editing using crc(Cyclic Redundancy Check)? **Best Regards** ...

compute crc of file in python

I want calculate crc of file, and get output like [E45A12AC] I don't want md5 or other. #!/usr/bin/env python import os, sys import zlib def crc(fileName): fd = open(fileName,"rb") content = fd.readlines() fd.close() for eachLine in content: zlib.crc32(eachLine) for eachFile in sys.argv[1:]: crc(eachFile) calculates for...

What is the fastest hash algorithm to check if two files are equal?

What is the fastest way to create a hash function which will be used to check if two files are equal? Security is not very important. Edit: I am sending a file over a network connection, and will be sure that the file on both sides are equal ...

CRC-4 implementation in C#

Hi. I've been searching the net for a C# implementation of the 4-bit cyclic redundancy check (CRC-4-ITU) but so far I've been unsuccessful. Is there anyone who's able to give me a reference implementation of CRC-4-ITU? Preferrably with the standard polynomial if there is a standard polynomial (I've read the spec pointed to by wikipedia...

CRC test vectors for CRC16 (CCITT)

Does anyone know of some CRC test vectors for CRC16-CCITT? I do not have a CRC implementation I can trust and either need to test someone's implementation or my own. (For CRC32, I use the PNG code as the gold standard, as it's a reputable reference implementation.) (this site's CRC calculator looks useful but I need to verify correctne...

What is CRC? And how does it help in error detection?

What is CRC? And how does it help in error detection? ...

Data Length vs CRC Length

I've seen 8-bit, 16-bit, and 32-bit CRCs. At what point do I need to jump to a wider CRC? My gut reaction is that it is based on the data length: 1-100 bytes: 8-bit CRC 101 - 1000 bytes: 16-bit CRC 1001 - ??? bytes: 32-bit CRC EDIT: Looking at the Wikipedia page about CRC and Lott's answer, here' what we have: <64 bytes: 8-bit CRC...

how to calculate crc16 in vc++

Hi I am using visual c++. I need to calculate crc16 16 bit checksum on packet data. Their is one getCRC32 function but i did not found any crc16 bit function. thanks ...

Fast file integrity verification

Is there any fast algorithm that allows to compare two files (for verification purpose) without need to read the entire contents? ...

Delphi 5 to 2010

I used same function ( OneWayEncrypt(edit1.Text) ) in Delphi 5 and 2010. Why the results are different? (Or how can I give the same results from Delphi 2010?) uses Sysutils, Windows, Dialogs, classes; function OneWayEncrypt(AStr: string): string; PROCEDURE CalcCRC32 (p: pointer; ByteCount: DWORD; VAR CRCvalue: DWORD); implementatio...

How to use boost::crc?

I want to use boost::crc so that it works exactly like PHP's crc32() function. I tried reading the horrible documentation and many headaches later I haven't made any progress. Apparently I have to do something like: int GetCrc32(const string& my_string) { return crc_32 = boost::crc<bits, TruncPoly, InitRem, FinalXor, ...