summaryrefslogtreecommitdiff
path: root/include/libbb.h
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-17 01:35:16 +0200
committerDenys Vlasenko2010-10-17 01:35:16 +0200
commita971a192e8af4279fb384be9ff0f0e8387b229cb (patch)
tree1946ade9ce19e7c7b2912d31f70bebcf87b54321 /include/libbb.h
parent446c2349b608fc4e25ac5846f4491bfa389330a6 (diff)
downloadbusybox-a971a192e8af4279fb384be9ff0f0e8387b229cb.zip
busybox-a971a192e8af4279fb384be9ff0f0e8387b229cb.tar.gz
shaN: code shrink
function old new delta init512_lo 32 40 +8 init256 32 40 +8 sha256_begin 42 28 -14 sha512_begin 81 53 -28 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-42) Total: -26 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include/libbb.h')
-rw-r--r--include/libbb.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/libbb.h b/include/libbb.h
index f406fc6..d05b2d4 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1514,7 +1514,7 @@ void FAST_FUNC read_base64(FILE *src_stream, FILE *dst_stream, int flags);
typedef struct sha1_ctx_t {
uint32_t hash[8]; /* 5, +3 elements for sha256 */
- uint64_t total64;
+ uint64_t total64; /* must be directly after hash[] */
uint8_t wbuffer[64]; /* NB: always correctly aligned for uint64_t */
void (*process_block)(struct sha1_ctx_t*) FAST_FUNC;
} sha1_ctx_t;
@@ -1527,7 +1527,7 @@ void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC;
#define sha256_end sha1_end
typedef struct sha512_ctx_t {
uint64_t hash[8];
- uint64_t total64[2];
+ uint64_t total64[2]; /* must be directly after hash[] */
uint8_t wbuffer[128]; /* NB: always correctly aligned for uint64_t */
} sha512_ctx_t;
void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC;