blob: aaf40e90fed4bc5381182977039e31ba1b101ce7 (
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
28
29
30
|
// Crypto/SHA256.h
#ifndef __CRYPTO_SHA256_H
#define __CRYPTO_SHA256_H
#include "Common/Types.h"
namespace NCrypto {
namespace NSHA256 {
class SHA256
{
static const UInt32 K[64];
UInt32 m_digest[8];
UInt64 m_count;
Byte _buffer[64];
static void Transform(UInt32 *digest, const UInt32 *data);
void WriteByteBlock();
public:
enum {DIGESTSIZE = 32};
SHA256() { Init(); } ;
void Init();
void Update(const Byte *data, size_t size);
void Final(Byte *digest);
};
}}
#endif
|