PandA-2024.02
Macros | Functions
sha.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define f1(x, y, z)   ((x & y) | (~x & z))
 
#define f2(x, y, z)   (x ^ y ^ z)
 
#define f3(x, y, z)   ((x & y) | (x & z) | (y & z))
 
#define f4(x, y, z)   (x ^ y ^ z)
 
#define CONST1   0x5a827999L
 
#define CONST2   0x6ed9eba1L
 
#define CONST3   0x8f1bbcdcL
 
#define CONST4   0xca62c1d6L
 
#define ROT32(x, n)   ((x << n) | (x >> (32 - n)))
 
#define FUNC(n, i)
 

Functions

void local_memset (INT32 *s, int c, int n, int e)
 
void local_memcpy (INT32 *s1, const BYTE *s2, int n)
 
static void sha_transform ()
 
void sha_init ()
 
void sha_update (const BYTE *buffer, int count)
 
void sha_final ()
 
void sha_stream ()
 

Macro Definition Documentation

◆ CONST1

#define CONST1   0x5a827999L

Definition at line 37 of file sha.c.

◆ CONST2

#define CONST2   0x6ed9eba1L

Definition at line 38 of file sha.c.

◆ CONST3

#define CONST3   0x8f1bbcdcL

Definition at line 39 of file sha.c.

◆ CONST4

#define CONST4   0xca62c1d6L

Definition at line 40 of file sha.c.

◆ f1

#define f1 (   x,
  y,
 
)    ((x & y) | (~x & z))

Definition at line 30 of file sha.c.

◆ f2

#define f2 (   x,
  y,
 
)    (x ^ y ^ z)

Definition at line 31 of file sha.c.

◆ f3

#define f3 (   x,
  y,
 
)    ((x & y) | (x & z) | (y & z))

Definition at line 32 of file sha.c.

◆ f4

#define f4 (   x,
  y,
 
)    (x ^ y ^ z)

Definition at line 33 of file sha.c.

◆ FUNC

#define FUNC (   n,
 
)
Value:
temp = ROT32(A,5) + f##n(B,C,D) + E + W[i] + CONST##n; \
E = D; D = C; C = ROT32(B,30); B = A; A = temp
#define ROT32(x, n)
Definition: sha.c:44
#define C
Definition: generate.c:15
#define A
Definition: generate.c:13
#define D
Definition: generate.c:16
#define W
Definition: deriche.h:36
#define B
Definition: generate.c:14

Definition at line 46 of file sha.c.

Referenced by gamma_test(), lgamma_test(), modf_test(), sha_transform(), and sincos_test().

◆ ROT32

#define ROT32 (   x,
 
)    ((x << n) | (x >> (32 - n)))

Definition at line 44 of file sha.c.

Function Documentation

◆ local_memcpy()

void local_memcpy ( INT32 s1,
const BYTE s2,
int  n 
)

Definition at line 71 of file sha.c.

Referenced by sha_update().

Here is the caller graph for this function:

◆ local_memset()

void local_memset ( INT32 s,
int  c,
int  n,
int  e 
)

Definition at line 51 of file sha.c.

Referenced by sha_final().

Here is the caller graph for this function:

◆ sha_final()

void sha_final ( )

Definition at line 177 of file sha.c.

Referenced by __attribute__(), and sha_stream().

Here is the caller graph for this function:

◆ sha_init()

void sha_init ( )

Definition at line 142 of file sha.c.

Referenced by __attribute__(), and sha_stream().

Here is the caller graph for this function:

◆ sha_stream()

void sha_stream ( )

Definition at line 204 of file sha.c.

References in_i, indata, sha_final(), sha_init(), sha_update(), and VSIZE.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ sha_transform()

static void sha_transform ( )
static

Definition at line 96 of file sha.c.

References A, B, C, D, FUNC, sha_info_data, sha_info_digest, and W.

Referenced by sha_final(), and sha_update().

Here is the caller graph for this function:

◆ sha_update()

void sha_update ( const BYTE buffer,
int  count 
)

Definition at line 156 of file sha.c.

Referenced by __attribute__(), and sha_stream().

Here is the caller graph for this function:

Generated on Mon Feb 12 2024 13:03:08 for PandA-2024.02 by doxygen 1.8.13