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

HAL HASH Generic Driver

 

UM1725

 

 

Timeout: Timeout value

Return values

 

HAL status

27.2.12HAL_HASH_SHA1_Accumulate

Function Name

HAL_StatusTypeDef HAL_HASH_SHA1_Accumulate

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size)

Function Description

Initializes the HASH peripheral in 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.

Return values

 

HAL status

27.2.13HAL_HASH_MD5_Start_IT

Function Name

HAL_StatusTypeDef HAL_HASH_MD5_Start_IT

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer)

Function Description

Initializes the HASH peripheral in MD5 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

 

 

16 bytes.

Return values

 

HAL status

27.2.14HAL_HASH_SHA1_Start_IT

Function Name

HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer)

Function Description

Initializes the HASH peripheral in 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.

Return values

 

HAL status

364/900

 

DOCID025834 Rev 2

UM1725

HAL HASH Generic Driver

27.2.15HAL_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.16HAL_HMAC_SHA1_Start

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.17HAL_HMAC_MD5_Start

Function Name

HAL_StatusTypeDef HAL_HMAC_MD5_Start

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer, uint32_t Timeout)

Function Description

Initializes the HASH peripheral in HMAC MD5 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.18HAL_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.

 

 

DOCID025834 Rev 2

365/900

HAL HASH Generic Driver

 

UM1725

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.19HAL_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.20HAL_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.21HAL_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.22HAL_HASH_SHA1_Start_IT

366/900

DOCID025834 Rev 2

UM1725

 

HAL HASH Generic Driver

Function Name

HAL_StatusTypeDef HAL_HASH_SHA1_Start_IT

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer)

Function Description

Initializes the HASH peripheral in 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.

Return values

 

HAL status

27.2.23HAL_HASH_MD5_Start_IT

Function Name

HAL_StatusTypeDef HAL_HASH_MD5_Start_IT

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer)

Function Description

Initializes the HASH peripheral in MD5 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

 

 

16 bytes.

Return values

 

HAL status

27.2.24HAL_HMAC_MD5_Start

Function Name

HAL_StatusTypeDef HAL_HMAC_MD5_Start

 

(HASH_HandleTypeDef * hhash, uint8_t * pInBuffer, uint32_t

 

Size, uint8_t * pOutBuffer, uint32_t Timeout)

Function Description

Initializes the HASH peripheral in HMAC MD5 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.25HAL_HMAC_SHA1_Start

DOCID025834 Rev 2

367/900

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