diff options
author | Denys Vlasenko | 2010-10-16 20:45:27 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-10-16 20:45:27 +0200 |
commit | c0683acce88efc1fe15d9a4332428b5a9fdc6c2e (patch) | |
tree | cb0f5bb99b5e5f4490be175238d3a877115bc468 /include | |
parent | 1a5e11c874a1f53c5205140a9d675b7e6404bbc9 (diff) | |
download | busybox-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.zip busybox-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.tar.gz |
*: pass md5/shaN context pointer as 1st arg, not last
function old new delta
md5_hash_block 458 459 +1
filter_rename_config 252 250 -2
md5_crypt 591 587 -4
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/libbb.h b/include/libbb.h index 034016f..1031cad 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1519,8 +1519,8 @@ typedef struct sha1_ctx_t { void (*process_block)(struct sha1_ctx_t*) FAST_FUNC; } sha1_ctx_t; void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC; -void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC; -void sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC; +void sha1_hash(sha1_ctx_t *ctx, const void *data, size_t length) FAST_FUNC; +void sha1_end(sha1_ctx_t *ctx, void *resbuf) FAST_FUNC; typedef struct sha1_ctx_t sha256_ctx_t; void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC; #define sha256_hash sha1_hash @@ -1531,8 +1531,8 @@ typedef struct sha512_ctx_t { uint8_t wbuffer[128]; /* NB: always correctly aligned for uint64_t */ } sha512_ctx_t; void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC; -void sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) FAST_FUNC; -void sha512_end(void *resbuf, sha512_ctx_t *ctx) FAST_FUNC; +void sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) FAST_FUNC; +void sha512_end(sha512_ctx_t *ctx, void *resbuf) FAST_FUNC; #if 1 typedef struct md5_ctx_t { uint32_t A; @@ -1551,8 +1551,8 @@ typedef struct md5_ctx_t { } md5_ctx_t; #endif void md5_begin(md5_ctx_t *ctx) FAST_FUNC; -void md5_hash(const void *data, size_t length, md5_ctx_t *ctx) FAST_FUNC; -void md5_end(void *resbuf, md5_ctx_t *ctx) FAST_FUNC; +void md5_hash(md5_ctx_t *ctx, const void *data, size_t length) FAST_FUNC; +void md5_end(md5_ctx_t *ctx, void *resbuf) FAST_FUNC; uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; |