Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
cubexHal.pdf
Скачиваний:
110
Добавлен:
10.02.2016
Размер:
16.16 Mб
Скачать

HAL HASH Generic Driver

 

UM1725

Function Name

HAL_StatusTypeDef HAL_HMAC_SHA1_Start

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer, uint32_t Timeout)

Function Description

Initializes the HASH peripheral in HMAC SHA1 mode then

 

processes pInBuffer.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

pInBuffer: Pointer to the input buffer (buffer to be hashed).

 

Size: Length of the input buffer in bytes. If the Size is not

 

 

multiple of 64 bytes, the padding is managed by hardware.

 

pOutBuffer: Pointer to the computed digest. Its size must be

 

 

20 bytes.

 

 

Timeout: Timeout value

Return values

 

HAL status

27.2.26HAL_HASH_SHA1_Start_DMA

Function Name

HAL_StatusTypeDef HAL_HASH_SHA1_Start_DMA

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size)

Function Description

Initializes the HASH peripheral in SHA1 mode then enables DMA

 

to control data transfer.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

pInBuffer: Pointer to the input buffer (buffer to be hashed).

 

Size: Length of the input buffer in bytes. If the Size is not

 

 

multiple of 64 bytes, the padding is managed by hardware.

Return values

 

HAL status

27.2.27HAL_HASH_SHA1_Finish

Function Name

HAL_StatusTypeDef HAL_HASH_SHA1_Finish

 

(HASH_HandleTypeDef * hhash, uint8_t * pOutBuffer, uint32_t

 

Timeout)

Function Description

Returns the computed digest in SHA1 mode.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

pOutBuffer: Pointer to the computed digest. Its size must be

 

 

20 bytes.

 

 

Timeout: Timeout value

Return values

 

HAL status

27.2.28HAL_HASH_MD5_Start_DMA

Function Name

HAL_StatusTypeDef HAL_HASH_MD5_Start_DMA

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size)

Function Description

Initializes the HASH peripheral in MD5 mode then enables DMA to

 

control data transfer.

368/900

DOCID025834 Rev 2

UM1725

 

HAL HASH Generic Driver

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

pInBuffer: Pointer to the input buffer (buffer to be hashed).

 

Size: Length of the input buffer in bytes. If the Size is not

 

 

multiple of 64 bytes, the padding is managed by hardware.

Return values

 

HAL status

27.2.29HAL_HASH_MD5_Finish

Function Name

HAL_StatusTypeDef HAL_HASH_MD5_Finish

 

(HASH_HandleTypeDef * hhash, uint8_t * pOutBuffer, uint32_t

 

Timeout)

Function Description

Returns the computed digest in MD5 mode.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

 

pOutBuffer: Pointer to the computed digest. Its size must be

 

 

16 bytes.

 

Timeout: Timeout value

Return values

 

HAL status

27.2.30HAL_HMAC_MD5_Start_DMA

Function Name

HAL_StatusTypeDef HAL_HMAC_MD5_Start_DMA

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size)

Function Description

Initializes the HASH peripheral in HMAC MD5 mode then enables

 

DMA to control data transfer.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

pInBuffer: Pointer to the input buffer (buffer to be hashed).

 

Size: Length of the input buffer in bytes. If the Size is not

 

 

multiple of 64 bytes, the padding is managed by hardware.

Return values

 

HAL status

27.2.31HAL_HMAC_SHA1_Start_DMA

Function Name

HAL_StatusTypeDef HAL_HMAC_SHA1_Start_DMA

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size)

Function Description

Initializes the HASH peripheral in HMAC SHA1 mode then enables

 

DMA to control data transfer.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

 

pInBuffer: Pointer to the input buffer (buffer to be hashed).

 

Size: Length of the input buffer in bytes. If the Size is not

 

 

multiple of 64 bytes, the padding is managed by hardware.

Return values

 

HAL status

DOCID025834 Rev 2

369/900

HAL HASH Generic Driver

UM1725

27.2.32HAL_HASH_GetState

Function Name

HAL_HASH_STATETypeDef HAL_HASH_GetState

 

(HASH_HandleTypeDef * hhash)

Function Description

return the HASH state

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

HAL state

27.2.33HAL_HASH_IRQHandler

Function Name

void HAL_HASH_IRQHandler (HASH_HandleTypeDef * hhash)

Function Description

This function handles HASH interrupt request.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

None

27.2.34 HAL_HASH_Init

Function Name

HAL_StatusTypeDef HAL_HASH_Init (HASH_HandleTypeDef *

 

hhash)

Function Description

Initializes the HASH according to the specified parameters in the

 

HASH_HandleTypeDef and creates the associated handle.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

HAL status

27.2.35HAL_HASH_DeInit

Function Name

HAL_StatusTypeDef HAL_HASH_DeInit

 

(HASH_HandleTypeDef * hhash)

Function Description

DeInitializes the HASH peripheral.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

HAL status

Notes

This API must be called before starting a new processing.

27.2.36HAL_HASH_MspInit

Function Name

void HAL_HASH_MspInit (HASH_HandleTypeDef * hhash)

Function Description

Initializes the HASH MSP.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

None

27.2.37HAL_HASH_MspDeInit

370/900

DOCID025834 Rev 2

UM1725

 

HAL HASH Generic Driver

Function Name

void HAL_HASH_MspDeInit (HASH_HandleTypeDef * hhash)

Function Description

DeInitializes HASH MSP.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

None

27.2.38HAL_HASH_InCpltCallback

Function Name

void HAL_HASH_InCpltCallback (HASH_HandleTypeDef *

 

hhash)

Function Description

Input data transfer complete callback.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

None

27.2.39HAL_HASH_ErrorCallback

Function Name

void HAL_HASH_ErrorCallback (HASH_HandleTypeDef *

 

hhash)

Function Description

Data transfer Error callback.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

None

27.2.40HAL_HASH_DgstCpltCallback

Function Name

void HAL_HASH_DgstCpltCallback (HASH_HandleTypeDef *

 

hhash)

Function Description

Digest computation complete callback.

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

None

Notes

This callback is not relevant with DMA.

27.2.41HAL_HASH_GetState

Function Name

HAL_HASH_STATETypeDef HAL_HASH_GetState

 

(HASH_HandleTypeDef * hhash)

Function Description

return the HASH state

Parameters

 

hhash: pointer to a HASH_HandleTypeDef structure that

 

 

contains the configuration information for HASH module

Return values

 

HAL state

27.2.42HAL_HASH_MspInit

DOCID025834 Rev 2

371/900

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]