Cryptographic algorithms (AES/HASH) adapter.
More...
Cryptographic algorithms (AES/HASH) adapter.
◆ ad_crypto_close()
| void ad_crypto_close |
( |
void |
| ) |
|
Close crypto engine.
This function:
- Clears the pending crypto interrupts.
- Disables the crypto interrupts.
- Disables the crypto clock.
- Releases the resources reserved to perform operation.
◆ ad_crypto_configure()
Configure the crypto engine.
A new crypto operation is configured by ad_crypto_open(). Use this function to re-configure the crypto engine.
- Parameters
-
| [in] | cfg | Crypto engine's configuration structure pointer. |
- Warning
- Never call this function before having first called the ad_crypto_open().
- See also
- ad_crypto_config_t
◆ ad_crypto_configure_for_next_fragment()
Configure crypto engine to perform next fragment of operation.
Configure the next essential parameters of the crypto engine in order to proceed to the next fragment of a crypto operation:
- Input data mode (AES/HASH).
- Input data address (AES/HASH).
- Input data length (AES/HASH).
- Output data address (AES).
- Parameters
-
| [in] | cfg | Crypto engine's configuration structure pointer. |
- See also
- ad_crypto_config_t
◆ ad_crypto_open()
Open crypto engine.
This function:
- Acquires the necessary resources to perform a crypto operation.
- Configures the crypto engine.
- Parameters
-
| [in] | cfg | Crypto engine's configuration structure pointer. |
| [in] | timeout | Expected time in OS ticks to acquire the resources and configure the engine. |
- Returns
- Handle to be used in subsequent API calls. Valid: return > 0, Invalid: return = NULL.
- See also
- ad_crypto_config_t
◆ ad_crypto_perform_operation()
| OS_BASE_TYPE ad_crypto_perform_operation |
( |
OS_TICK_TIME |
timeout | ) |
|
Perform crypto operation.
- Parameters
-
| [in] | timeout | Maximum expected time in OS ticks to perform operation. |
- Returns
- OS_EVENT_SIGNALED, if the operation completed, other value if not.