Botan  1.11.15
src/lib/hash/sha1_x86_64/sha1_x86_64.cpp
Go to the documentation of this file.
00001 /*
00002 * SHA-160
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/sha1_x86_64.h>
00010 
00011 namespace Botan {
00012 
00013 BOTAN_REGISTER_NAMED_T_NOARGS(HashFunction, SHA_160_X86_64, "SHA-160", "x86-64");
00014 
00015 namespace {
00016 
00017 extern "C"
00018 void botan_sha160_x86_64_compress(u32bit[5], const byte[64], u32bit[80]);
00019 
00020 }
00021 
00022 /*
00023 * SHA-160 Compression Function
00024 */
00025 void SHA_160_X86_64::compress_n(const byte input[], size_t blocks)
00026    {
00027    for(size_t i = 0; i != blocks; ++i)
00028       {
00029       botan_sha160_x86_64_compress(&digest[0], input, &W[0]);
00030       input += hash_block_size();
00031       }
00032    }
00033 
00034 }