Skip to content

Commit cc7ccf9

Browse files
danielinuxdouzzer
authored andcommitted
Move heap variable to all sha implementations
1 parent 260a0de commit cc7ccf9

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

wolfssl/wolfcrypt/sha.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ struct wc_Sha {
151151
#else
152152
word32 digest[WC_SHA_DIGEST_SIZE / sizeof(word32)];
153153
#endif
154-
void* heap;
155154
#endif
155+
void* heap;
156156
#ifdef WOLFSSL_PIC32MZ_HASH
157157
hashUpdCache cache; /* cache for updates */
158158
#endif

wolfssl/wolfcrypt/sha256.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,13 +194,13 @@ struct wc_Sha256 {
194194
word32 buffLen; /* in bytes */
195195
word32 loLen; /* length in bytes */
196196
word32 hiLen; /* length in bytes */
197-
void* heap;
198197

199198
#ifdef WC_C_DYNAMIC_FALLBACK
200199
int sha_method;
201200
#endif
202201

203202
#endif
203+
void* heap;
204204
#ifdef WOLFSSL_PIC32MZ_HASH
205205
hashUpdCache cache; /* cache for updates */
206206
#endif

wolfssl/wolfcrypt/sha512.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ struct wc_Sha512 {
144144
cy_stc_crypto_sha_state_t hash_state;
145145
cy_en_crypto_sha_mode_t sha_mode;
146146
cy_stc_crypto_v2_sha512_buffers_t sha_buffers;
147+
void* heap;
147148
#else
148149
word64 digest[WC_SHA512_DIGEST_SIZE / sizeof(word64)];
149150
word64 buffer[WC_SHA512_BLOCK_SIZE / sizeof(word64)];

0 commit comments

Comments
 (0)