mbedtls_md_clone() function
This function clones the state of an message-digest context. \warning This function clones the message-digest state, not the HMAC state.
Arguments
dst
The destination context.
src
The context to be cloned.
Return value
\c 0 on success. #MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter-verification failure.
Notes
You must call mbedtls_md_setup() on \c dst before calling this function. The two contexts must have the same type, for example, both are SHA-256.