mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-10 07:36:28 -04:00
Refactor macro-spanning if in sha512.c
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
5846c9de19
commit
f3b1eaf95d
@ -418,9 +418,11 @@ int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
|
|||||||
sha512_put_uint64_be( ctx->state[4], output, 32 );
|
sha512_put_uint64_be( ctx->state[4], output, 32 );
|
||||||
sha512_put_uint64_be( ctx->state[5], output, 40 );
|
sha512_put_uint64_be( ctx->state[5], output, 40 );
|
||||||
|
|
||||||
|
int truncated = 0;
|
||||||
#if !defined(MBEDTLS_SHA512_NO_SHA384)
|
#if !defined(MBEDTLS_SHA512_NO_SHA384)
|
||||||
if( ctx->is384 == 0 )
|
truncated = ctx->is384;
|
||||||
#endif
|
#endif
|
||||||
|
if( !truncated )
|
||||||
{
|
{
|
||||||
sha512_put_uint64_be( ctx->state[6], output, 48 );
|
sha512_put_uint64_be( ctx->state[6], output, 48 );
|
||||||
sha512_put_uint64_be( ctx->state[7], output, 56 );
|
sha512_put_uint64_be( ctx->state[7], output, 56 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user