Skip to content

Commit dad0832

Browse files
Merge branch 'psa-hash_clone' into psa-api-1.0-beta
Update the documentation of psa_hash_clone().
2 parents ea2e360 + e43aa39 commit dad0832

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

include/psa/crypto.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,15 @@ psa_status_t psa_hash_verify(psa_hash_operation_t *operation,
10951095
psa_status_t psa_hash_abort(psa_hash_operation_t *operation);
10961096

10971097
/** Clone a hash operation.
1098+
*
1099+
* This function copies the state of an ongoing hash operation to
1100+
* a new operation object. In other words, this function is equivalent
1101+
* to calling psa_hash_setup() on \p target_operation with the same
1102+
* algorithm that \p source_operation was set up for, then
1103+
* psa_hash_update() on \p target_operation with the same input that
1104+
* that was passed to \p source_operation. After this function returns, the
1105+
* two objects are independent, i.e. subsequent calls involving one of
1106+
* the objects do not affect the other object.
10981107
*
10991108
* \param[in] source_operation The active hash operation to clone.
11001109
* \param[in,out] target_operation The operation object to set up.
@@ -1104,7 +1113,7 @@ psa_status_t psa_hash_abort(psa_hash_operation_t *operation);
11041113
* \retval #PSA_ERROR_BAD_STATE
11051114
* \p source_operation is not an active hash operation.
11061115
* \retval #PSA_ERROR_BAD_STATE
1107-
* \p source_operation is active.
1116+
* \p target_operation is active.
11081117
* \retval #PSA_ERROR_COMMUNICATION_FAILURE
11091118
* \retval #PSA_ERROR_HARDWARE_FAILURE
11101119
* \retval #PSA_ERROR_TAMPERING_DETECTED

0 commit comments

Comments
 (0)