esp_sha_read_digest_state() function
Read out the current state of the SHA digest loaded in the engine. If the SHA suffix padding block has been executed already, the value that is read is the SHA digest (in big endian format). Otherwise, the value that is read is an interim SHA state.
Arguments
sha_type
SHA algorithm in use.
Notes
This is a piece of a SHA algorithm, rather than an entire SHA algorithm. Call esp_sha_try_lock_engine() before calling this function. Do not call esp_sha_lock_memory_block() beforehand, this is done inside the function. If sha_type is SHA2_384, only 48 bytes of state will be read. This is enough for the final SHA2_384 digest, but if you want the interim SHA-384 state (to continue digesting) then pass SHA2_512 instead.
esp_sha_read_digest_state() is called by 12 functions and calls 7 functions:
![]()
esp_sha_read_digest_state()
esp_sha_read_digest_state():
![]()
esp_sha_read_digest_state()