aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 80a1c912c..4c9901027 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -1321,27 +1321,27 @@ extern const char bb_uuenc_tbl_std[];
1321void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC; 1321void bb_uuencode(char *store, const void *s, int length, const char *tbl) FAST_FUNC;
1322 1322
1323typedef struct sha1_ctx_t { 1323typedef struct sha1_ctx_t {
1324 uint32_t count[2]; 1324 uint64_t total64;
1325 uint32_t wbuffer[16]; /* NB: always correctly aligned for uint64_t */
1325 uint32_t hash[5]; 1326 uint32_t hash[5];
1326 uint32_t wbuf[16];
1327} sha1_ctx_t; 1327} sha1_ctx_t;
1328void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC; 1328void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC;
1329void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC; 1329void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC;
1330void sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC; 1330void sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC;
1331typedef struct sha256_ctx_t { 1331typedef struct sha256_ctx_t {
1332 unsigned wbuflen;
1332 uint32_t H[8]; 1333 uint32_t H[8];
1333 uint32_t total[2]; /* rename to "count"? */ 1334 uint64_t total64;
1334 uint32_t buflen; 1335 char wbuffer[64*2]; /* NB: always correctly aligned for uint64_t */
1335 char buffer[128]; /* NB: always correctly aligned for uint32_t */
1336} sha256_ctx_t; 1336} sha256_ctx_t;
1337void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC; 1337void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC;
1338void sha256_hash(const void *buffer, size_t len, sha256_ctx_t *ctx) FAST_FUNC; 1338void sha256_hash(const void *buffer, size_t len, sha256_ctx_t *ctx) FAST_FUNC;
1339void sha256_end(void *resbuf, sha256_ctx_t *ctx) FAST_FUNC; 1339void sha256_end(void *resbuf, sha256_ctx_t *ctx) FAST_FUNC;
1340typedef struct sha512_ctx_t { 1340typedef struct sha512_ctx_t {
1341 unsigned wbuflen;
1341 uint64_t H[8]; 1342 uint64_t H[8];
1342 uint64_t total[2]; 1343 uint64_t total64[2];
1343 uint64_t buflen; 1344 char wbuffer[128*2]; /* NB: always correctly aligned for uint64_t */
1344 char buffer[256]; /* NB: always correctly aligned for uint64_t */
1345} sha512_ctx_t; 1345} sha512_ctx_t;
1346void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC; 1346void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC;
1347void sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) FAST_FUNC; 1347void sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) FAST_FUNC;