Adler32 is another checksum algorithm that is used as a "quick and dirty" version of the CRC32 algorithm (it was developed by Mark Adler from Fletcher's checksum).
You get a single 32-bit number that represents a block of data (of any size but >128 bytes preferably).
If the data changes in any way (even a single bit) the Adler32 calculation would yield a completely different value.
or use one instance for several Adler32s:
or if reading a file in blocks:
while(Read(Buffer, Size)) Adler32.From(Buffer, Size, true);
Test Vectors used in the tester are generated from the RFC1950 C implementation. There are no official test vectors.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
(3287) Last modified: Tue, 03 Feb 2009 18:26:33 +0000