Skip to content

Commit 6c34771

Browse files
jh6186adbridge
authored andcommitted
tidy up PR comments #3
Signed-off-by: PARKJIHOON <[email protected]>
1 parent cd37b0c commit 6c34771

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

features/mbedtls/targets/TARGET_Samsung/sha/sha256_alt.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
334334
ctx->state[i] += A[i];
335335
}
336336

337-
return( 0 );
337+
return 0;
338338
}
339339

340340

@@ -450,8 +450,6 @@ int mbedtls_sha256_sw_update_ret(mbedtls_sha256_context *ctx, const unsigned cha
450450

451451
return 0;
452452
}
453-
454-
455453

456454
#endif /* MBEDTLS_SHA256_ALT */
457455
#endif /* MBEDTLS_SHA256_C */

features/mbedtls/targets/TARGET_Samsung/sha/sha512_alt.c

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ int mbedtls_sha512_starts_ret(mbedtls_sha512_context *ctx, int is384)
138138
memset(ctx, 0, sizeof(mbedtls_sha512_context));
139139
ctx->is384 = is384;
140140

141-
return( 0 );
141+
return 0;
142142
}
143143

144144
/*
@@ -241,7 +241,18 @@ int mbedtls_sha512_finish_ret(mbedtls_sha512_context *ctx, unsigned char output[
241241
return ret;
242242
}
243243

244+
<<<<<<< cd37b0cf8e0be356705b7c17c0871c8f3acc03fa
244245
}
246+
=======
247+
//! step 3 : get hash result from SSS
248+
ret = mb_hash_final(&stHASH_Input, &ctx->pstDigest);
249+
250+
if (ret != SSSR_SUCCESS) {
251+
return ret;
252+
}
253+
254+
}
255+
>>>>>>> tidy up PR comments #3
245256
return 0;
246257
}
247258

@@ -381,7 +392,7 @@ int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
381392
ctx->state[i] += A[i];
382393
}
383394

384-
return( 0 );
395+
return 0;
385396
}
386397

387398
int mbedtls_sha512_sw_finish_ret(mbedtls_sha512_context *ctx,
@@ -444,7 +455,7 @@ int mbedtls_sha512_sw_finish_ret(mbedtls_sha512_context *ctx,
444455
sha512_put_uint64_be(ctx->state[7], output, 56);
445456
}
446457

447-
return( 0 );
458+
return 0;
448459
}
449460

450461
int mbedtls_sha512_sw_update_ret(mbedtls_sha512_context *ctx, const unsigned char *input, size_t ilen)
@@ -494,7 +505,7 @@ int mbedtls_sha512_sw_update_ret(mbedtls_sha512_context *ctx, const unsigned cha
494505
memcpy((void *)(ctx->buffer + left), input, ilen);
495506
}
496507

497-
return( 0 );
508+
return 0;
498509
}
499510

500511

0 commit comments

Comments
 (0)