CARME-M4 BSP  V1.5
Message Digest generation functions

Message Digest generation functions. More...

+ Collaboration diagram for Message Digest generation functions:

Functions

void HASH_SetLastWordValidBitsNbr (uint16_t ValidNumber)
 Configure the Number of valid bits in last word of the message. More...
 
void HASH_DataIn (uint32_t Data)
 Writes data in the Data Input FIFO. More...
 
uint8_t HASH_GetInFIFOWordsNbr (void)
 Returns the number of words already pushed into the IN FIFO. More...
 
void HASH_GetDigest (HASH_MsgDigest *HASH_MessageDigest)
 Provides the message digest result. More...
 
void HASH_StartDigest (void)
 Starts the message padding and calculation of the final message. More...
 

Detailed Description

Message Digest generation functions.

 ===============================================================================
                  ##### Message Digest generation functions #####
 ===============================================================================  
 [..] This section provides functions allowing the generation of message digest: 
   (+) Push data in the IN FIFO : using HASH_DataIn()
   (+) Get the number of words set in IN FIFO, use HASH_GetInFIFOWordsNbr()  
   (+) set the last word valid bits number using HASH_SetLastWordValidBitsNbr() 
   (+) start digest calculation : using HASH_StartDigest()
   (+) Get the Digest message : using HASH_GetDigest()

Function Documentation

void HASH_DataIn ( uint32_t  Data)

Writes data in the Data Input FIFO.

Parameters
Datanew data of the message to be processed.
Return values
None

Definition at line 306 of file stm32f4xx_hash.c.

+ Here is the caller graph for this function:

void HASH_GetDigest ( HASH_MsgDigest HASH_MessageDigest)

Provides the message digest result.

Note
In MD5 mode, Data[7] to Data[4] filed of HASH_MsgDigest structure is not used and is read as zero. In SHA-1 mode, Data[7] to Data[5] filed of HASH_MsgDigest structure is not used and is read as zero. In SHA-224 mode, Data[7] filed of HASH_MsgDigest structure is not used and is read as zero.
Parameters
HASH_MessageDigestpointer to a HASH_MsgDigest structure which will hold the message digest result
Return values
None

Definition at line 335 of file stm32f4xx_hash.c.

+ Here is the caller graph for this function:

uint8_t HASH_GetInFIFOWordsNbr ( void  )

Returns the number of words already pushed into the IN FIFO.

Parameters
None
Return values
Thevalue of words already pushed into the IN FIFO.

Definition at line 317 of file stm32f4xx_hash.c.

void HASH_SetLastWordValidBitsNbr ( uint16_t  ValidNumber)

Configure the Number of valid bits in last word of the message.

Parameters
ValidNumberNumber of valid bits in last word of the message. This parameter must be a number between 0 and 0x1F.
  • 0x00: All 32 bits of the last data written are valid
  • 0x01: Only bit [0] of the last data written is valid
  • 0x02: Only bits[1:0] of the last data written are valid
  • 0x03: Only bits[2:0] of the last data written are valid
  • ...
  • 0x1F: Only bits[30:0] of the last data written are valid
Note
The Number of valid bits must be set before to start the message digest competition (in Hash and HMAC) and key treatment(in HMAC).
Return values
None

Definition at line 291 of file stm32f4xx_hash.c.

+ Here is the caller graph for this function:

void HASH_StartDigest ( void  )

Starts the message padding and calculation of the final message.

Parameters
None
Return values
None

Definition at line 353 of file stm32f4xx_hash.c.

+ Here is the caller graph for this function: