~ubuntu-branches/ubuntu/saucy/clamav/saucy-backports

« back to all changes in this revision

Viewing changes to libclamav/7z/Sha256.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2014-07-15 01:08:10 UTC
  • mfrom: (0.35.47 sid)
  • Revision ID: package-import@ubuntu.com-20140715010810-ru66ek4fun2iseba
Tags: 0.98.4+dfsg-2~ubuntu13.10.1
No-change backport to saucy (LP: #1341962)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Sha256.h -- SHA-256 Hash
2
 
2010-06-11 : Igor Pavlov : Public domain */
3
 
 
4
 
#ifndef __CRYPTO_SHA256_H
5
 
#define __CRYPTO_SHA256_H
6
 
 
7
 
#include "Types.h"
8
 
 
9
 
EXTERN_C_BEGIN
10
 
 
11
 
#define SHA256_DIGEST_SIZE 32
12
 
 
13
 
#define __USE_CLAM_SHA256_FOR_7Z__
14
 
 
15
 
#ifndef __USE_CLAM_SHA256_FOR_7Z__
16
 
typedef struct
17
 
{
18
 
  UInt32 state[8];
19
 
  UInt64 count;
20
 
  Byte buffer[64];
21
 
} CSha256;
22
 
 
23
 
void Sha256_Init(CSha256 *p);
24
 
void Sha256_Update(CSha256 *p, const Byte *data, size_t size);
25
 
void Sha256_Final(CSha256 *p, Byte *digest);
26
 
#else
27
 
#include "../sha256.h"
28
 
#define CSha256 SHA256_CTX
29
 
#define Sha256_Init sha256_init
30
 
#define Sha256_Update sha256_update
31
 
#define Sha256_Final sha256_final
32
 
#endif
33
 
EXTERN_C_END
34
 
 
35
 
#endif