Botan
1.11.15
|
00001 /* 00002 * MD4 (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/md4_x86_32.h> 00010 00011 namespace Botan { 00012 00013 BOTAN_REGISTER_NAMED_T_NOARGS(HashFunction, MD4_X86_32, "MD4", "x86-32"); 00014 00015 /** 00016 * MD4 compression function in x86-32 asm 00017 * @param digest the current digest 00018 * @param input the input block 00019 * @param M the message buffer 00020 */ 00021 extern "C" void botan_md4_x86_32_compress(u32bit digest[4], 00022 const byte input[64], 00023 u32bit M[16]); 00024 00025 /* 00026 * MD4 Compression Function 00027 */ 00028 void MD4_X86_32::compress_n(const byte input[], size_t blocks) 00029 { 00030 for(size_t i = 0; i != blocks; ++i) 00031 { 00032 botan_md4_x86_32_compress(&digest[0], input, &M[0]); 00033 input += hash_block_size(); 00034 } 00035 } 00036 00037 }