Welcome to mirror list, hosted at ThFree Co, Russian Federation.

sha1.h « RarAES « Crypto « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 295f41315514936c64e42d43569f7258cc6708e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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

struct CSHA1
{
  UInt32 m_State[5];
  UInt64 m_Count;
  unsigned char _buffer[64];

  void Transform(const UInt32 data[16]);
  void WriteByteBlock();
  
  void Init();
  void Update(const Byte *data, size_t size);
  void Final(Byte *digest);
};

#endif