124 #include "stm32f4xx_rcc.h" 201 HASH_InitStruct->HASH_DataType | \
202 HASH_InitStruct->HASH_AlgoMode);
298 HASH->STR |= ValidNumber;
338 HASH_MessageDigest->
Data[0] =
HASH->HR[0];
339 HASH_MessageDigest->
Data[1] =
HASH->HR[1];
340 HASH_MessageDigest->
Data[2] =
HASH->HR[2];
341 HASH_MessageDigest->
Data[3] =
HASH->HR[3];
342 HASH_MessageDigest->
Data[4] =
HASH->HR[4];
590 HASH->IMR |= HASH_IT;
595 HASH->IMR &= (uint32_t)(~HASH_IT);
613 uint32_t tempreg = 0;
629 if ((tempreg & HASH_FLAG) != (uint32_t)RESET)
657 HASH->SR = ~(uint32_t)HASH_FLAG;
679 if (((
HASH->IMR & tmpreg) & HASH_IT) !=
RESET)
707 HASH->SR = (uint32_t)(~HASH_IT);
#define HASH_AlgoMode_HMAC
uint32_t HASH_HMACKeyType
#define IS_HASH_GET_IT(IT)
void HASH_ClearFlag(uint32_t HASH_FLAG)
Clears the HASH flags.
void HASH_Reset(void)
Resets the HASH processor core, so that the HASH will be ready to compute the message digest of a new...
#define RCC_AHB2Periph_HASH
#define IS_HASH_CLEAR_FLAG(FLAG)
FlagStatus HASH_GetFlagStatus(uint32_t HASH_FLAG)
Checks whether the specified HASH flag is set or not.
void HASH_ITConfig(uint32_t HASH_IT, FunctionalState NewState)
Enables or disables the specified HASH interrupts.
void assert_param(int val)
void HASH_ClearITPendingBit(uint32_t HASH_IT)
Clears the HASH interrupt pending bit(s).
uint8_t HASH_GetInFIFOWordsNbr(void)
Returns the number of words already pushed into the IN FIFO.
uint32_t HASH_AlgoSelection
#define IS_FUNCTIONAL_STATE(STATE)
#define IS_HASH_VALIDBITSNUMBER(VALIDBITS)
#define HASH_DataType_32b
HASH context swapping structure definition.
This file contains all the functions prototypes for the HASH firmware library.
void HASH_AutoStartDigest(FunctionalState NewState)
Enables or disables auto-start message padding and calculation of the final message digest at the end...
#define IS_HASH_GET_FLAG(FLAG)
void HASH_Init(HASH_InitTypeDef *HASH_InitStruct)
Initializes the HASH peripheral according to the specified parameters in the HASH_InitStruct structur...
#define IS_HASH_DATATYPE(DATATYPE)
void HASH_SaveContext(HASH_Context *HASH_ContextSave)
Save the Hash peripheral Context.
void HASH_DeInit(void)
De-initializes the HASH peripheral registers to their default reset values.
void HASH_StructInit(HASH_InitTypeDef *HASH_InitStruct)
Fills each HASH_InitStruct member with its default value.
#define HASH_AlgoMode_HASH
#define IS_HASH_HMAC_KEYTYPE(KEYTYPE)
void HASH_GetDigest(HASH_MsgDigest *HASH_MessageDigest)
Provides the message digest result.
#define IS_HASH_ALGOMODE(ALGOMODE)
HASH message digest result structure definition.
void HASH_DMACmd(FunctionalState NewState)
Enables or disables the HASH DMA interface.
void HASH_RestoreContext(HASH_Context *HASH_ContextRestore)
Restore the Hash peripheral Context.
void HASH_StartDigest(void)
Starts the message padding and calculation of the final message.
#define HASH_HMACKeyType_ShortKey
ITStatus HASH_GetITStatus(uint32_t HASH_IT)
Checks whether the specified HASH interrupt has occurred or not.
#define HASH_AlgoSelection_SHA1
#define IS_HASH_ALGOSELECTION(ALGOSELECTION)
void RCC_AHB2PeriphResetCmd(uint32_t RCC_AHB2Periph, FunctionalState NewState)
Forces or releases AHB2 peripheral reset.
HASH Init structure definition.
void HASH_SetLastWordValidBitsNbr(uint16_t ValidNumber)
Configure the Number of valid bits in last word of the message.
void HASH_DataIn(uint32_t Data)
Writes data in the Data Input FIFO.