mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-25 00:02:42 +00:00
Restore SHA256 & SHA512 prototypes
Signed-off-by: Thomas Daubney <thomas.daubney@arm.com>
This commit is contained in:
parent
3e0273f41a
commit
ae5f8cc253
@ -119,6 +119,20 @@ int mbedtls_sha256_update(mbedtls_sha256_context *ctx,
|
|||||||
int mbedtls_sha256_finish(mbedtls_sha256_context *ctx,
|
int mbedtls_sha256_finish(mbedtls_sha256_context *ctx,
|
||||||
unsigned char *output);
|
unsigned char *output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief This function processes a single data block within
|
||||||
|
* the ongoing SHA-256 computation. This function is for
|
||||||
|
* internal use only.
|
||||||
|
*
|
||||||
|
* \param ctx The SHA-256 context. This must be initialized.
|
||||||
|
* \param data The buffer holding one block of data. This must
|
||||||
|
* be a readable buffer of length \c 64 Bytes.
|
||||||
|
*
|
||||||
|
* \return \c 0 on success.
|
||||||
|
* \return A negative error code on failure.
|
||||||
|
*/
|
||||||
|
int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
|
||||||
|
const unsigned char data[64]);
|
||||||
/**
|
/**
|
||||||
* \brief This function calculates the SHA-224 or SHA-256
|
* \brief This function calculates the SHA-224 or SHA-256
|
||||||
* checksum of a buffer.
|
* checksum of a buffer.
|
||||||
|
@ -120,6 +120,21 @@ int mbedtls_sha512_update(mbedtls_sha512_context *ctx,
|
|||||||
int mbedtls_sha512_finish(mbedtls_sha512_context *ctx,
|
int mbedtls_sha512_finish(mbedtls_sha512_context *ctx,
|
||||||
unsigned char *output);
|
unsigned char *output);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief This function processes a single data block within
|
||||||
|
* the ongoing SHA-512 computation.
|
||||||
|
* This function is for internal use only.
|
||||||
|
*
|
||||||
|
* \param ctx The SHA-512 context. This must be initialized.
|
||||||
|
* \param data The buffer holding one block of data. This
|
||||||
|
* must be a readable buffer of length \c 128 Bytes.
|
||||||
|
*
|
||||||
|
* \return \c 0 on success.
|
||||||
|
* \return A negative error code on failure.
|
||||||
|
*/
|
||||||
|
int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
|
||||||
|
const unsigned char data[128]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief This function calculates the SHA-512 or SHA-384
|
* \brief This function calculates the SHA-512 or SHA-384
|
||||||
* checksum of a buffer.
|
* checksum of a buffer.
|
||||||
|
@ -617,7 +617,7 @@ static size_t mbedtls_internal_sha256_process_many(mbedtls_sha256_context *ctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
|
int mbedtls_internal_sha256_process(mbedtls_sha256_context *ctx,
|
||||||
const unsigned char data[SHA256_BLOCK_SIZE])
|
const unsigned char data[SHA256_BLOCK_SIZE])
|
||||||
{
|
{
|
||||||
if (mbedtls_a64_crypto_sha256_has_support()) {
|
if (mbedtls_a64_crypto_sha256_has_support()) {
|
||||||
|
@ -737,7 +737,7 @@ static size_t mbedtls_internal_sha512_process_many(mbedtls_sha512_context *ctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
|
int mbedtls_internal_sha512_process(mbedtls_sha512_context *ctx,
|
||||||
const unsigned char data[SHA512_BLOCK_SIZE])
|
const unsigned char data[SHA512_BLOCK_SIZE])
|
||||||
{
|
{
|
||||||
if (mbedtls_a64_crypto_sha512_has_support()) {
|
if (mbedtls_a64_crypto_sha512_has_support()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user