Botan  1.11.15
src/lib/hash/md5_x86_32/md5_x86_32.cpp
Go to the documentation of this file.
00001 /*
00002 * MD5 (x86-32)
00003 * (C) 1999-2007 Jack Lloyd
00004 *
00005 * Botan is released under the Simplified BSD License (see license.txt)
00006 */
00007 
00008 #include <botan/internal/hash_utils.h>
00009 #include <botan/md5_x86_32.h>
00010 
00011 namespace Botan {
00012 
00013 BOTAN_REGISTER_NAMED_T_NOARGS(HashFunction, MD5_X86_32, "MD5", "x86-32");
00014 
00015 namespace {
00016 
00017 extern "C"
00018 void botan_md5_x86_32_compress(u32bit[4], const byte[64], u32bit[16]);
00019 
00020 }
00021 
00022 /*
00023 * MD5 Compression Function
00024 */
00025 void MD5_X86_32::compress_n(const byte input[], size_t blocks)
00026    {
00027    for(size_t i = 0; i != blocks; ++i)
00028       {
00029       botan_md5_x86_32_compress(&digest[0], input, &M[0]);
00030       input += hash_block_size();
00031       }
00032    }
00033 
00034 }