Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/ext/libkirk/SHA1.h
3187 views
1
#pragma once
2
3
#include "kirk_common.h"
4
5
/* POINTER defines a generic pointer type */
6
typedef unsigned char *POINTER;
7
typedef const unsigned char *CONST_POINTER;
8
9
/* UINT4 defines a four byte word */
10
typedef unsigned int UINT4;
11
12
/* BYTE defines a unsigned character */
13
typedef unsigned char BYTE;
14
15
#ifndef TRUE
16
#define FALSE 0
17
#define TRUE ( !FALSE )
18
#endif /* TRUE */
19
20
/* The structure for storing SHS info */
21
22
typedef struct
23
{
24
UINT4 digest[ 5 ]; /* Message digest */
25
UINT4 countLo, countHi; /* 64-bit bit count */
26
UINT4 data[ 16 ]; /* SHS data buffer */
27
int Endianness;
28
} SHA_CTX;
29
30
/* Message digest functions */
31
32
void SHAInit(SHA_CTX *);
33
void SHAUpdate(SHA_CTX *, const BYTE *buffer, int count);
34
void SHAFinal(BYTE *output, SHA_CTX *);
35
36
void endianTest(int *endianness);
37
38