1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

Rename "input_copy" -> "local_input"

This helps to prevent confusion as it avoids overloading the word
"copy" as both an action and an object.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
David Horstmann
2023-11-20 17:15:32 +00:00
parent 2f307b4216
commit f1734054fa
4 changed files with 62 additions and 62 deletions

View File

@ -854,34 +854,34 @@ psa_status_t mbedtls_psa_verify_hash_complete(
psa_status_t mbedtls_psa_verify_hash_abort(
mbedtls_psa_verify_hash_interruptible_operation_t *operation);
typedef struct psa_crypto_input_copy_s {
typedef struct psa_crypto_local_input_s {
uint8_t *buffer;
size_t length;
} psa_crypto_input_copy_t;
} psa_crypto_local_input_t;
#define PSA_CRYPTO_INPUT_COPY_INIT { NULL, 0 }
#define PSA_CRYPTO_LOCAL_INPUT_INIT { NULL, 0 }
/** Allocate a local copy of an input buffer.
*
* \param[in] input Pointer to input buffer.
* \param[in] input_len Length of the input buffer.
* \param[out] input_copy Pointer to a psa_crypto_input_copy_t struct to
* populate with the input copy.
* \param[out] local_input Pointer to a psa_crypto_local_input_t struct to
* populate with the local input copy.
* \return #PSA_SUCCESS, if the buffer was successfully
* copied.
* \return #PSA_ERROR_INSUFFICIENT_MEMORY, if a copy of
* the buffer cannot be allocated.
*/
psa_status_t psa_crypto_input_copy_alloc(const uint8_t *input, size_t input_len,
psa_crypto_input_copy_t *input_copy);
psa_status_t psa_crypto_local_input_alloc(const uint8_t *input, size_t input_len,
psa_crypto_local_input_t *local_input);
/** Free a local copy of an input buffer.
*
* \param[in] input_copy Pointer to a psa_crypto_input_copy_t struct
* \param[in] local_input Pointer to a psa_crypto_local_input_t struct
* populated by a previous call to
* psa_crypto_input_copy_alloc().
* psa_crypto_local_input_alloc().
*/
void psa_crypto_input_copy_free(psa_crypto_input_copy_t *input_copy);
void psa_crypto_local_input_free(psa_crypto_local_input_t *local_input);
typedef struct psa_crypto_output_copy_s {
uint8_t *original;