mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Add function prototypes for copying functions
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
@ -515,4 +515,34 @@ psa_status_t psa_verify_hash_builtin(
|
|||||||
psa_algorithm_t alg, const uint8_t *hash, size_t hash_length,
|
psa_algorithm_t alg, const uint8_t *hash, size_t hash_length,
|
||||||
const uint8_t *signature, size_t signature_length);
|
const uint8_t *signature, size_t signature_length);
|
||||||
|
|
||||||
|
/** Copy from an input buffer to a local copy.
|
||||||
|
*
|
||||||
|
* \param[in] input Pointer to input buffer.
|
||||||
|
* \param[in] input_len Length of the input buffer.
|
||||||
|
* \param[out] input_copy Pointer to a local copy in which to store the input data.
|
||||||
|
* \param[out] input_copy_len Length of the local copy buffer.
|
||||||
|
* \return #PSA_SUCCESS, if the buffer was successfully
|
||||||
|
* copied.
|
||||||
|
* \return #PSA_ERROR_BUFFER_TOO_SMALL, if the local copy
|
||||||
|
* is too small to hold contents of the
|
||||||
|
* input buffer.
|
||||||
|
*/
|
||||||
|
psa_status_t psa_crypto_copy_input(const uint8_t *input, size_t input_len,
|
||||||
|
uint8_t *input_copy, size_t input_copy_len);
|
||||||
|
|
||||||
|
/** Copy from a local output buffer into a user-supplied one.
|
||||||
|
*
|
||||||
|
* \param[in] output_copy Pointer to a local buffer containing the output.
|
||||||
|
* \param[in] output_copy_len Length of the local buffer.
|
||||||
|
* \param[out] output Pointer to user-supplied output buffer.
|
||||||
|
* \param[out] output_len Length of the user-supplied output buffer.
|
||||||
|
* \return #PSA_SUCCESS, if the buffer was successfully
|
||||||
|
* copied.
|
||||||
|
* \return #PSA_ERROR_BUFFER_TOO_SMALL, if the
|
||||||
|
* user-supplied output buffer is too small to
|
||||||
|
* hold the contents of the local buffer.
|
||||||
|
*/
|
||||||
|
psa_status_t psa_crypto_copy_output(const uint8_t *output_copy, size_t output_copy_len,
|
||||||
|
uint8_t *output, size_t output_len);
|
||||||
|
|
||||||
#endif /* PSA_CRYPTO_CORE_H */
|
#endif /* PSA_CRYPTO_CORE_H */
|
||||||
|
Reference in New Issue
Block a user