STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_hal_cryp.h File Reference

Header file of CRYP HAL module. More...

Go to the source code of this file.

Data Structures

struct  __CRYP_HandleTypeDef
 CRYP handle Structure definition. More...
 

Typedefs

typedef struct __CRYP_HandleTypeDef CRYP_HandleTypeDef
 CRYP handle Structure definition. More...
 
typedef void(* pCRYP_CallbackTypeDef) (CRYP_HandleTypeDef *hcryp)
 HAL CRYP Callback pointer definition. More...
 

Enumerations

enum  HAL_CRYP_STATETypeDef {
  HAL_CRYP_STATE_RESET = 0x00, HAL_CRYP_STATE_READY = 0x01, HAL_CRYP_STATE_BUSY = 0x02, HAL_CRYP_STATE_TIMEOUT = 0x03,
  HAL_CRYP_STATE_ERROR = 0x04, HAL_CRYP_STATE_SUSPENDED = 0x05
}
 HAL CRYP State structures definition. More...
 
enum  HAL_PhaseTypeDef {
  HAL_CRYP_PHASE_READY = 0x01, HAL_CRYP_PHASE_PROCESS = 0x02, HAL_CRYP_PHASE_START = 0x03, HAL_CRYP_PHASE_INIT_OVER = 0x04,
  HAL_CRYP_PHASE_HEADER_OVER = 0x05, HAL_CRYP_PHASE_PAYLOAD_OVER = 0x06, HAL_CRYP_PHASE_FINAL_OVER = 0x07, HAL_CRYP_PHASE_HEADER_SUSPENDED = 0x08,
  HAL_CRYP_PHASE_PAYLOAD_SUSPENDED = 0x09, HAL_CRYP_PHASE_NOT_USED = 0x0a
}
 HAL CRYP phase structures definition. More...
 
enum  HAL_SuspendTypeDef { HAL_CRYP_SUSPEND_NONE = 0x00, HAL_CRYP_SUSPEND = 0x01 }
 HAL CRYP mode suspend definitions. More...
 
enum  HAL_CRYP_CallbackIDTypeDef {
  HAL_CRYP_INPUTCPLT_CB_ID = 0x01U, HAL_CRYP_OUTPUTCPLT_CB_ID = 0x02U, HAL_CRYP_COMPCPLT_CB_ID = 0x03U, HAL_CRYP_ERROR_CB_ID = 0x04U,
  HAL_CRYP_MSPINIT_CB_ID = 0x05U, HAL_CRYP_MSPDEINIT_CB_ID = 0x06U
}
 HAL CRYP common Callback ID enumeration definition. More...
 

Functions

HAL_StatusTypeDef HAL_CRYP_Init (CRYP_HandleTypeDef *hcryp)
 Initialize the CRYP according to the specified parameters in the CRYP_InitTypeDef and initialize the associated handle. More...
 
HAL_StatusTypeDef HAL_CRYP_DeInit (CRYP_HandleTypeDef *hcryp)
 DeInitialize the CRYP peripheral. More...
 
void HAL_CRYP_MspInit (CRYP_HandleTypeDef *hcryp)
 Initialize the CRYP MSP. More...
 
void HAL_CRYP_MspDeInit (CRYP_HandleTypeDef *hcryp)
 DeInitialize CRYP MSP. More...
 
HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Encrypt pPlainData in AES ECB encryption mode. The cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Decrypt pCypherData in AES ECB decryption mode with key derivation, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Encrypt pPlainData in AES CBC encryption mode with key derivation. The cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Decrypt pCypherData in AES ECB decryption mode with key derivation, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData, uint32_t Timeout)
 Encrypt pPlainData in AES CTR encryption mode. The cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData, uint32_t Timeout)
 Decrypt pCypherData in AES CTR decryption mode, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Encrypt pPlainData in AES ECB encryption mode using Interrupt, the cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Encrypt pPlainData in AES CBC encryption mode using Interrupt, the cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Encrypt pPlainData in AES CTR encryption mode using Interrupt, the cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Decrypt pCypherData in AES ECB decryption mode using Interrupt, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Decrypt pCypherData in AES CTR decryption mode using Interrupt, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_IT (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Decrypt pCypherData in AES CBC decryption mode using Interrupt, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESECB_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Encrypt pPlainData in AES ECB encryption mode using DMA, the cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESECB_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Decrypt pCypherData in AES ECB decryption mode using DMA, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCBC_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Encrypt pPlainData in AES CBC encryption mode using DMA, the cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCBC_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Decrypt pCypherData in AES CBC decryption mode using DMA, the decyphered data are available in pPlainData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCTR_Encrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pPlainData, uint16_t Size, uint8_t *pCypherData)
 Encrypt pPlainData in AES CTR encryption mode using DMA, the cypher data are available in pCypherData. More...
 
HAL_StatusTypeDef HAL_CRYP_AESCTR_Decrypt_DMA (CRYP_HandleTypeDef *hcryp, uint8_t *pCypherData, uint16_t Size, uint8_t *pPlainData)
 Decrypt pCypherData in AES CTR decryption mode using DMA, the decyphered data are available in pPlainData. More...
 
void HAL_CRYP_InCpltCallback (CRYP_HandleTypeDef *hcryp)
 Input DMA transfer complete callback. More...
 
void HAL_CRYP_OutCpltCallback (CRYP_HandleTypeDef *hcryp)
 Output DMA transfer complete callback. More...
 
void HAL_CRYP_ErrorCallback (CRYP_HandleTypeDef *hcryp)
 CRYP error callback. More...
 
HAL_StatusTypeDef HAL_CRYP_RegisterCallback (CRYP_HandleTypeDef *hcryp, HAL_CRYP_CallbackIDTypeDef CallbackID, pCRYP_CallbackTypeDef pCallback)
 Register a User CRYP Callback To be used instead of the weak (surcharged) predefined callback. More...
 
HAL_StatusTypeDef HAL_CRYP_UnRegisterCallback (CRYP_HandleTypeDef *hcryp, HAL_CRYP_CallbackIDTypeDef CallbackID)
 Unregister a CRYP Callback CRYP Callback is redirected to the weak (surcharged) predefined callback. More...
 
void HAL_CRYP_IRQHandler (CRYP_HandleTypeDef *hcryp)
 Handle AES interrupt request. More...
 
HAL_CRYP_STATETypeDef HAL_CRYP_GetState (CRYP_HandleTypeDef *hcryp)
 Return the CRYP handle state. More...
 
uint32_t HAL_CRYP_GetError (CRYP_HandleTypeDef *hcryp)
 Return the CRYP peripheral error. More...
 

Variables

 C
 

Detailed Description

Header file of CRYP HAL module.

Author
MCD Application Team
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l4xx_hal_cryp.h.

Typedef Documentation

◆ CRYP_HandleTypeDef

CRYP handle Structure definition.

◆ pCRYP_CallbackTypeDef

typedef void(* pCRYP_CallbackTypeDef) (CRYP_HandleTypeDef *hcryp)

HAL CRYP Callback pointer definition.

pointer to a CRYP common callback functions

Definition at line 207 of file stm32l4xx_hal_cryp.h.

Enumeration Type Documentation

◆ HAL_CRYP_CallbackIDTypeDef

HAL CRYP common Callback ID enumeration definition.

Enumerator
HAL_CRYP_INPUTCPLT_CB_ID 

CRYP input DMA transfer completion callback ID

HAL_CRYP_OUTPUTCPLT_CB_ID 

CRYP output DMA transfer completion callback ID

HAL_CRYP_COMPCPLT_CB_ID 

CRYP computation completion callback ID

HAL_CRYP_ERROR_CB_ID 

CRYP error callback ID

HAL_CRYP_MSPINIT_CB_ID 

CRYP MspInit callback ID

HAL_CRYP_MSPDEINIT_CB_ID 

CRYP MspDeInit callback ID

Definition at line 140 of file stm32l4xx_hal_cryp.h.

◆ HAL_CRYP_STATETypeDef

HAL CRYP State structures definition.

Enumerator
HAL_CRYP_STATE_RESET 

CRYP not yet initialized or disabled

HAL_CRYP_STATE_READY 

CRYP initialized and ready for use

HAL_CRYP_STATE_BUSY 

CRYP internal processing is ongoing

HAL_CRYP_STATE_TIMEOUT 

CRYP timeout state

HAL_CRYP_STATE_ERROR 

CRYP error state

HAL_CRYP_STATE_SUSPENDED 

CRYP suspended

Definition at line 86 of file stm32l4xx_hal_cryp.h.

◆ HAL_PhaseTypeDef

HAL CRYP phase structures definition.

Enumerator
HAL_CRYP_PHASE_READY 

CRYP peripheral is ready for initialization.

HAL_CRYP_PHASE_PROCESS 

CRYP peripheral is in processing phase

HAL_CRYP_PHASE_START 

CRYP peripheral has been initialized but GCM/GMAC(/CMAC)(/CCM) initialization phase has not started

HAL_CRYP_PHASE_INIT_OVER 

GCM/GMAC(/CMAC)(/CCM) init phase has been carried out

HAL_CRYP_PHASE_HEADER_OVER 

GCM/GMAC(/CMAC)(/CCM) header phase has been carried out

HAL_CRYP_PHASE_PAYLOAD_OVER 

GCM(/CCM) payload phase has been carried out

HAL_CRYP_PHASE_FINAL_OVER 

GCM/GMAC(/CMAC)(/CCM) final phase has been carried out

HAL_CRYP_PHASE_HEADER_SUSPENDED 

GCM/GMAC(/CMAC)(/CCM) header phase has been suspended

HAL_CRYP_PHASE_PAYLOAD_SUSPENDED 

GCM(/CCM) payload phase has been suspended

HAL_CRYP_PHASE_NOT_USED 

Phase is irrelevant to the current chaining mode

Definition at line 99 of file stm32l4xx_hal_cryp.h.

◆ HAL_SuspendTypeDef

HAL CRYP mode suspend definitions.

Enumerator
HAL_CRYP_SUSPEND_NONE 

CRYP peripheral suspension not requested

HAL_CRYP_SUSPEND 

CRYP peripheral suspension requested

Definition at line 117 of file stm32l4xx_hal_cryp.h.

118 {
119  HAL_CRYP_SUSPEND_NONE = 0x00,
120  HAL_CRYP_SUSPEND = 0x01
HAL_SuspendTypeDef
HAL CRYP mode suspend definitions.

Variable Documentation

◆ C

C