mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 02:37:28 +02:00
Get rid of magic number to size structs.
This commit is contained in:
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
#include <wolfssl/wolfcrypt/settings.h>
|
#include <wolfssl/wolfcrypt/settings.h>
|
||||||
#include <wolfssl/wolfcrypt/types.h>
|
#include <wolfssl/wolfcrypt/types.h>
|
||||||
|
#include <wolfssl/wolfcrypt/sha256.h>
|
||||||
#ifdef WOLFSSL_PREFIX
|
#ifdef WOLFSSL_PREFIX
|
||||||
#include "prefix_sha.h"
|
#include "prefix_sha.h"
|
||||||
#endif
|
#endif
|
||||||
@ -151,7 +151,7 @@ typedef WOLFSSL_SHA224_CTX SHA224_CTX;
|
|||||||
* to Sha256, is expected to also be 16 byte aligned addresses. */
|
* to Sha256, is expected to also be 16 byte aligned addresses. */
|
||||||
typedef struct WOLFSSL_SHA256_CTX {
|
typedef struct WOLFSSL_SHA256_CTX {
|
||||||
/* big enough to hold wolfcrypt Sha256, but check on init */
|
/* big enough to hold wolfcrypt Sha256, but check on init */
|
||||||
ALIGN16 void* holder[(274 + CTX_SHA_HW_ADDER + WC_ASYNC_DEV_SIZE) /
|
ALIGN16 void* holder[sizeof(wc_Sha256) /
|
||||||
sizeof(void*)];
|
sizeof(void*)];
|
||||||
#if defined(WOLFSSL_DEVCRYPTO_HASH) || defined(WOLFSSL_HASH_KEEP)
|
#if defined(WOLFSSL_DEVCRYPTO_HASH) || defined(WOLFSSL_HASH_KEEP)
|
||||||
ALIGN16 void* keephash_holder[sizeof(void*) + (2 * sizeof(unsigned int))];
|
ALIGN16 void* keephash_holder[sizeof(void*) + (2 * sizeof(unsigned int))];
|
||||||
|
Reference in New Issue
Block a user