nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches

◆ bl_sha256_verify()

int bl_sha256_verify ( const uint8_t *  data,
uint32_t  data_len,
const uint8_t *  expected 
)

#include <include/bl_crypto.h>

Calculate a digest and verify it directly.

Parameters
[in]dataThe data to hash.
[in]data_lenThe length of data.
[in]expectedThe expected digest over data.
Return values
0If the procedure succeeded and the resulting digest is identical to expected.
-EHASHINVIf the procedure succeeded, but the digests don't match.
Returns
Any error code from bl_sha256_init, bl_sha256_update, or bl_sha256_finalize if something else went wrong.