adler32

Algorithm for message code validation

Hi! If you read this thread before - forget everything I wrote, I must have been drunk when I wrote it. I'm starting over: I'm currently working on a project where we will be using some sort of algorithm for validating user input. There are three parties to consider; Client - Browsing our web pages Company - We, handling the Client r...

Given filename, how can I get the Adler32 using Crypto++

Given a "string filename", how can I get the Adler32 checksum using the C++ Crypto++ library. I am a little confused about using their FileSource and Sink system. Below I have the skeleton of the code that does MD5, but I can't seem to find any examples or tutorials on the Adler32 usage. string filename = "/tmp/data.txt" string file_ad...

Why modulo 65521 in Adler-32 checksum algorithm?

The Adler-32 checksum algorithm does sums modulo 65521. I know that 65521 is the largest prime number that fits in 16 bits, but why is it important to use a prime number in this algorithm? (I'm sure the answer will seem obvious once someone tells me, but the number-theory parts of my brain just aren't working. Even without expertise i...

Php: How to calculate Adler32 checksum for zip?

I'm using a combination of Paul Duncans php ZipStream (http://pablotron.org/software/zipstream-php/) on the server side, for on-the-fly creation of zips, and Fzip (http://codeazur.com.br/lab/fzip/) on the Flex/Air client side. Works fine in Air, but when running Flex in browser, the zip needs to include a Adler32 checksum in the header ...

Hash function combining - is there a significant decrease in collision risk?

Hi all. Does anyone know if there's a real benefit regarding decreasing collision probability by combining hash functions? I especially need to know this regarding 32 bit hashing, namely combining Adler32 and CRC32. Basically, will adler32(crc32(data)) yield a smaller collision probability than crc32(data)? The last comment here gives so...

Cumulative Hashes

I've read before here on SO that there are some hash algorithms (I think one of those is adler32) that support the following property: adler32('abc'); // 123 adler32('def'); // 456 adler32('abcdef'); // 579 (123 + 456) Please note that the results are only examples to demonstrate what I want to archieve. I've tried some examples with ...