19 #ifndef MBEDTLS_SHA_ALT_HW_H 20 #define MBEDTLS_SHA_ALT_HW_H 22 #if defined(MBEDTLS_SHA1_ALT) || defined(MBEDTLS_SHA256_ALT) || defined(MBEDTLS_SHA512_ALT) 39 uint32_t blocksize_mask;
45 void crypto_sha_update(crypto_sha_context *ctx,
const unsigned char *input,
size_t ilen);
46 void crypto_sha_update_nobuf(crypto_sha_context *ctx,
const unsigned char *input,
size_t ilen,
int islast);
47 void crypto_sha_getinternstate(
unsigned char output[],
size_t olen);
49 #if defined(MBEDTLS_SHA1_ALT) 51 void mbedtls_sha1_hw_init( crypto_sha_context *ctx );
52 void mbedtls_sha1_hw_free( crypto_sha_context *ctx );
53 void mbedtls_sha1_hw_starts( crypto_sha_context *ctx );
54 void mbedtls_sha1_hw_update( crypto_sha_context *ctx,
const unsigned char *input,
size_t ilen );
55 void mbedtls_sha1_hw_finish( crypto_sha_context *ctx,
unsigned char output[20] );
56 void mbedtls_sha1_hw_process( crypto_sha_context *ctx,
const unsigned char data[64] );
60 #if defined(MBEDTLS_SHA256_ALT) 62 void mbedtls_sha256_hw_init( crypto_sha_context *ctx );
63 void mbedtls_sha256_hw_free( crypto_sha_context *ctx );
64 void mbedtls_sha256_hw_starts( crypto_sha_context *ctx,
int is224 );
65 void mbedtls_sha256_hw_update( crypto_sha_context *ctx,
const unsigned char *input,
67 void mbedtls_sha256_hw_finish( crypto_sha_context *ctx,
unsigned char output[32] );
68 void mbedtls_sha256_hw_process( crypto_sha_context *ctx,
const unsigned char data[64] );
72 #if defined(MBEDTLS_SHA512_ALT) 74 void mbedtls_sha512_hw_init( crypto_sha_context *ctx );
75 void mbedtls_sha512_hw_free( crypto_sha_context *ctx );
76 void mbedtls_sha512_hw_starts( crypto_sha_context *ctx,
int is384 );
77 void mbedtls_sha512_hw_update( crypto_sha_context *ctx,
const unsigned char *input,
79 void mbedtls_sha512_hw_finish( crypto_sha_context *ctx,
unsigned char output[64] );
80 void mbedtls_sha512_hw_process( crypto_sha_context *ctx,
const unsigned char data[128] );