sha1.h
来自「由7-zip提供的压缩、解压缩程序」· C头文件 代码 · 共 33 行
H
33 行
// sha1.h// This file is based on public domain // Steve Reid and Wei Dai's code from Crypto++#ifndef __RAR_SHA1#define __RAR_SHA1#include <stddef.h>#include "../../../Common/Types.h"#define HW 5// Sha1 implementation in RAR before version 3.60 has bug:// it changes data bytes in some cases.// So this class supports both versions: normal_SHA and rar3Modestruct CSHA1{ UInt32 m_State[5]; UInt64 m_Count; unsigned char _buffer[64]; void Transform(UInt32 data[16], bool returnRes = false); void WriteByteBlock(bool returnRes = false); public: void Init(); void Update(Byte *data, size_t size, bool rar350Mode = false); void Final(Byte *digest);};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?