checksum

How to calculate Least Signficant Byte in Ruby

I'm sending a byte array to a piece of hardware. The first 7 bytes contain data and the 8th byte is a checksum. The 8th byte is the Least Significant Byte of the sum of the first 7 bytes. Examples that include the correct checksum. The last byte of each of these is the checksum 200-30-7-5-1-2-0-245 42-0-0-1-176-0-148-39 42-0-0-3-17...

How to use ORC or calculate checksum for this capcha?

this url: http://bbs.pramool.com/webboard/checksum/index7.php?imgnum=CHMSuB5Q9j = 4P2A2W ? ...

Question regarding ip checksum code

unsigned short /* this function generates header checksums */ csum (unsigned short *buf, int nwords) { unsigned long sum; for (sum = 0; nwords > 0; nwords--) // add words(16bits) together { sum += *buf++; } sum = (sum >> 16) + (sum & 0xffff); //add carry over sum += (sum >> 16); //MY question: what ex...

How is a CRC32 checksum calculated?

Maybe I'm just not seeing it, but CRC32 seems either needlessly complicated, or insufficiently explained anywhere I could find on the web. I understand the gist of it is that it is the remainder from a non-carry based arithmitic division of the message value, divided by the polynomial, but the actual implementation of it escapes me. I'...

Script to copy files on CD and not on hard disk to a new directory

I need to copy files from a set of CDs that have a lot of duplicate content, with each other, and with what's already on my hard disk. The file names of identical files are not the same, and are in sub-directories of different names. I want to copy non-duplicate files from the CD into a new directory on the hard disk. I don't care abo...

How to generate a checksum for an java object

Hi there, I'm looking for an solution to generate a checksum for any type of Java object, which remains the same for every exection of an application which produces the same object. I tried it with Object.hashCode(), but as I read in the api ....This integer need not remain consistent from one execution of an application to another...

Find out CRC or CHECKSUM of RS232 data

I need to communicate with a RS232 device, I have no specs or information available. I send a 16 byte command and get a 16 byte result back. The last byte looks like some kind of crc or checksum, I have tried using this http://miscel.dk/MiscEl/miscelCRCandChecksum.html with no luck. Anyone can reverse engineer the crc/checksum algorit...

What hash algorithms are parallelizable? Optimizing the hashing of large files utilizing on multi-core CPUs.

I'm interested in optimizing the hashing of some large files (optimizing wall clock time). The I/O has been optimized well enough already and the I/O device (local SSD) is only tapped at about 25% of capacity, while one of the CPU cores is completely maxed-out. I have more cores available, and in the future will likely have even more...

apply checksum in c to a char

How do you apply checkksum to a char in c? ...

Changing checksum of a binary

How to modify checksum of a binary? Specifically, I want to edit embedded checksum in a dll/exe. Are there any tools available? ...

Creating a unique key based on file content in python

I got many, many files to be uploaded to the server, and I just want a way to avoid duplicates. Thus, generating a unique and small key value from a big string seemed something that a checksum was intended to do, and hashing seemed like the evolution of that. So I was going to use hash md5 to do this. But then I read somewhere that "MD...

About checksum of TCP/IP layer

Has anyone tested what will happen if checksum doesn't match? Will the packet be ignored directly? Suppose it's HTTP protocal at the application layer. ...

Determining whether a file is a duplicate

Is there a reliable way to determine whether or not two files are the same? For example, two files with the same size and type may or may not be the same binarilly (yeah, I know it's not really a word). I assume that comparing one or two checksums of the files will help, but I wonder: How reliable are checksums at determining whether t...

Does having an unencrypted sha-224 checksum create a vulnerability?

If I have a packet of data that is encrypted yet also includes a sha-224 checksum that is not encrypted, am I creating a security vulnerability? Or perhaps the checksum should be produced after encryption? ...

Trying to figure out how to check a checksum

I'm trying to figure out how to check a checksum. My message looks like this: 38 0A 01 12 78 96 FE 00 F0 FB D0 FE F6 F6 being the checksum. I convert the preceding 12 sets in to binary and then add them together. Then attempt a bitwise operation to apply the 2s complement. I get a value of -1562, but I can't convert it back to hex to ...

how to compare the checksums in a list corresponding to a file path with the file path in the operating system In Python?

Hi all, how to compare the checksums in a list corresponding to a file path with the file path in the operating system In Python? import os,sys,libxml2 files=[] sha1s=[] doc = libxml2.parseFile('files.xml') for path in doc.xpathEval('//File/Path'): files.append(path.content) for sha1 in doc.xpathEval('//File/Hash'): sha1s.append(...

Determine whether .NET assemblies were built from the same source

Does anyone know of a way to compare two .NET assemblies to determine whether they were built from the "same" source files? I am aware that there are some differencing utilities available, such as the plugin for Reflector, but I am not interested in viewing differences in a GUI, I just want an automated way to compare a collection of bi...

checksum error with building an HTTP packet(but over TCP, like syn/ack its ok)

I am building a NAT program,I change each packet that comes from our internal subnet, change it's source IP address by libnet functions.( catch the packet with libpcap, put it sniff structures and build the new packet with libnet) I am trying to build an http packet. When I look on wireshark, I see that the new packet that I have built...

Webtest for binary content, how to ?

Assume a web page that returns binary content: http://localhost/website/Default.aspx?FileId=value and we have some files with known Ids and checksums (i.e. MD5). How it's possible to extract whole response and calculate it's check-sum via some visual studio webtest ? ...

Why do we need libnet_do_checksum? HTTP checksum doesnt work

I understood that the tcp checksum calculates automaticly if we write 0 in the function libnet_build_tcp, so why do we need libnet_do_checksum? I have an error, when I am trying to build a new packet. A regulat TCP packet(SYN,ACK) works fine, but an HTTP packet don't work, beacuse a tcp checksum error. Do I have to use libnet_do_checksu...