⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mdx_hash.cpp

📁 含有多种公开密钥算法、多种块加密、多种数据流加密、多种HASH函数、多种CheckSum校验、多种MAC校验等几十种加密算法的程序
💻 CPP
字号:
/************************************************** MDx Hash Function Source File                  ** (C) 1999-2002 The Botan Project                **************************************************/#include <botan/mdx_hash.h>namespace Botan {/************************************************** MDx_HashFunction Constructor                   **************************************************/MDx_HashFunction::MDx_HashFunction(u32bit hash_len, u32bit block_len) :   HashFunction(hash_len, block_len), buffer(block_len)   {   count = position = 0;   }/************************************************** Update the hash                                **************************************************/void MDx_HashFunction::add_data(const byte input[], u32bit length)   {   count += length;   buffer.copy(position, input, length);   if(position + length >= HASH_BLOCK_SIZE)      {      hash(buffer);      input += (HASH_BLOCK_SIZE - position);      length -= (HASH_BLOCK_SIZE - position);      while(length >= HASH_BLOCK_SIZE)         {         hash(input);         input += HASH_BLOCK_SIZE;         length -= HASH_BLOCK_SIZE;         }      buffer.copy(input, length);      position = 0;      }   position += length;   }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -