Update docs/getting_started.md

Co-Authored-By: Gilles Peskine <gilles.peskine@arm.com>
This commit is contained in:
Guy Wild 2019-09-04 09:16:53 +03:00 committed by GitHub
parent 33d421dd6a
commit eefc517b1f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -375,7 +375,8 @@ algorithms.
**To calculate a hash:** **To calculate a hash:**
1. Allocate an operation structure (`psa_hash_operation_t`) to pass to the hash functions. 1. Allocate an operation structure (`psa_hash_operation_t`) to pass to the hash functions.
1. Call `psa_hash_setup()` to initialize the operation structure and specify the hash algorithm. 1. Initialize the operation structure to zero or to `PSA_HASH_OPERATION_INIT`.
1. Call `psa_hash_setup()` to specify the hash algorithm.
1. Call `psa_hash_update()` one or more times, passing the whole message or a fragment of the message on each call. 1. Call `psa_hash_update()` one or more times, passing the whole message or a fragment of the message on each call.
1. Call `psa_hash_finish()` to calculate the hash, or `psa_hash_verify()` to compare the computed hash with an expected hash value. 1. Call `psa_hash_finish()` to calculate the hash, or `psa_hash_verify()` to compare the computed hash with an expected hash value.