@@ -340,7 +340,7 @@ CHIP_ERROR Hash_SHA256_stream::Begin(void)
340
340
mbedtls_sha256_context * const context = to_inner_hash_sha256_context (&mContext );
341
341
342
342
#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
343
- const int result = mbedtls_sha256_starts (context, 0 );
343
+ const int result = mbedtls_sha256_starts (context, 0 );
344
344
#else
345
345
const int result = mbedtls_sha256_starts_ret (context, 0 );
346
346
#endif
@@ -380,7 +380,7 @@ CHIP_ERROR Hash_SHA256_stream::AddData(const ByteSpan data)
380
380
mbedtls_sha256_context * const context = to_inner_hash_sha256_context (&mContext );
381
381
382
382
#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
383
- const int result = mbedtls_sha256_update (context, Uint8::to_const_uchar (data.data ()), data.size ());
383
+ const int result = mbedtls_sha256_update (context, Uint8::to_const_uchar (data.data ()), data.size ());
384
384
#else
385
385
const int result = mbedtls_sha256_update_ret (context, Uint8::to_const_uchar (data.data ()), data.size ());
386
386
#endif
@@ -452,13 +452,13 @@ CHIP_ERROR Hash_SHA256_stream::Finish(MutableByteSpan & out_buffer)
452
452
mbedtls_sha256_context * const context = to_inner_hash_sha256_context (&mContext );
453
453
454
454
#if (MBEDTLS_VERSION_NUMBER >= 0x03000000)
455
- const int result = mbedtls_sha256_finish (context, Uint8::to_uchar (out_buffer.data ()));
455
+ const int result = mbedtls_sha256_finish (context, Uint8::to_uchar (out_buffer.data ()));
456
456
#else
457
457
const int result = mbedtls_sha256_finish_ret (context, Uint8::to_uchar (out_buffer.data ()));
458
458
#endif
459
459
460
460
VerifyOrReturnError (result == 0 , CHIP_ERROR_INTERNAL);
461
- out_buffer = out_buffer.SubSpan (0 , kSHA256_Hash_Length );
461
+ out_buffer = out_buffer.SubSpan (0 , kSHA256_Hash_Length );
462
462
#endif
463
463
464
464
return CHIP_NO_ERROR;
0 commit comments