ReactOS 0.4.17-dev-1005-g171e1de
hash_buffer_pattern.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bytesInBuffer & if (bytesInBuffer > 0)
 
 if (cbData >=SYMCRYPT_XXX_INPUT_BLOCK_SIZE)
 
 if (cbData > 0)
 

Function Documentation

◆ if() [1/3]

bytesInBuffer & if ( bytesInBuffer  ,
0   
)

Definition at line 26 of file hash_buffer_pattern.c.

27 {
29 if( cbData < freeInBuffer )
30 {
31 //
32 // All the data will fit in the buffer.
33 // We don't do anything here.
34 // As cbData < INPUT_BLOCK_SIZE the bulk data processing is skipped,
35 // and the data will be copied to the buffer at the end
36 // of this code.
37 } else {
38 //
39 // Enough data to fill the whole buffer & process it
40 //
41 memcpy(&state->buffer[bytesInBuffer], pbData, freeInBuffer);
42 pbData += freeInBuffer;
43 cbData -= freeInBuffer;
45
46 //
47 // Set bytesInBuffer to zero to ensure that the trailing data in the
48 // buffer will be copied to the right location of the buffer below.
49 //
50 bytesInBuffer = 0;
51 }
52 }
static int state
Definition: maze.c:121
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define SYMCRYPT_XXX_INPUT_BLOCK_SIZE
Definition: sc_lib.h:151
#define SYMCRYPT_XxxAppendBlocks
Definition: sc_lib.h:126
SIZE_T bytesInBuffer
PCBYTE PBYTE SIZE_T cbData
PCBYTE pbData
ULONG_PTR SIZE_T
Definition: typedefs.h:80

◆ if() [2/3]

if ( cbData  ,
0   
)

Definition at line 68 of file hash_buffer_pattern.c.

69 {
70 memcpy( &state->buffer[bytesInBuffer], pbData, cbData );
71 }

◆ if() [3/3]

if ( cbData >=  SYMCRYPT_XXX_INPUT_BLOCK_SIZE)

Definition at line 57 of file hash_buffer_pattern.c.

58 {
59 SIZE_T cbDataRoundedDown = cbData & ~(SIZE_T)(SYMCRYPT_XXX_INPUT_BLOCK_SIZE - 1);
60 SYMCRYPT_XxxAppendBlocks( &state->chain, pbData, cbDataRoundedDown );
61 pbData += cbDataRoundedDown;
62 cbData -= cbDataRoundedDown;
63 }