mirror of https://github.com/ARMmbed/mbed-os.git
Replace 64 by MBEDTLS_SHA256_BLOCK_SIZE
parent
4976e2f3c7
commit
b929b54b7c
|
@ -71,12 +71,12 @@ void mbedtls_sha256_starts( mbedtls_sha256_context *ctx, int is224 )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] )
|
void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[MBEDTLS_SHA256_BLOCK_SIZE] )
|
||||||
{
|
{
|
||||||
if (ctx->is224 == 0) {
|
if (ctx->is224 == 0) {
|
||||||
HAL_HASHEx_SHA256_Accumulate(&ctx->hhash_sha256, (uint8_t *) data, 64);
|
HAL_HASHEx_SHA256_Accumulate(&ctx->hhash_sha256, (uint8_t *) data, MBEDTLS_SHA256_BLOCK_SIZE);
|
||||||
} else {
|
} else {
|
||||||
HAL_HASHEx_SHA224_Accumulate(&ctx->hhash_sha256, (uint8_t *) data, 64);
|
HAL_HASHEx_SHA224_Accumulate(&ctx->hhash_sha256, (uint8_t *) data, MBEDTLS_SHA256_BLOCK_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ void mbedtls_sha256_update( mbedtls_sha256_context *ctx, const unsigned char *in
|
||||||
void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32] );
|
void mbedtls_sha256_finish( mbedtls_sha256_context *ctx, unsigned char output[32] );
|
||||||
|
|
||||||
/* Internal use */
|
/* Internal use */
|
||||||
void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[64] );
|
void mbedtls_sha256_process( mbedtls_sha256_context *ctx, const unsigned char data[MBEDTLS_SHA256_BLOCK_SIZE] );
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue