blob: fd3bddd83e25d740c03e600ceea158fee1db190e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef _RAR_SHA256_
#define _RAR_SHA256_
#ifndef PRESENT_INT32
#error 32-bit integer type is required for SHA-256.
#endif
#define SHA256_DIGEST_SIZE 32
typedef struct
{
uint32 H[8];
uint64 Count;
const byte *Data;
byte Buffer[64];
} sha256_context;
void sha256_init(sha256_context *ctx);
void sha256_process(sha256_context *ctx, const void *Data, size_t Size);
void sha256_done(sha256_context *ctx, byte *Digest);
#endif
|