summaryrefslogtreecommitdiff
path: root/libbb/sha1.c
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-16 20:45:27 +0200
committerDenys Vlasenko2010-10-16 20:45:27 +0200
commitc0683acce88efc1fe15d9a4332428b5a9fdc6c2e (patch)
treecb0f5bb99b5e5f4490be175238d3a877115bc468 /libbb/sha1.c
parent1a5e11c874a1f53c5205140a9d675b7e6404bbc9 (diff)
downloadbusybox-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 'libbb/sha1.c')
-rw-r--r--libbb/sha1.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/sha1.c b/libbb/sha1.c
index beeb70c..fac23c0 100644
--- a/libbb/sha1.c
+++ b/libbb/sha1.c
@@ -361,7 +361,7 @@ void FAST_FUNC sha512_begin(sha512_ctx_t *ctx)
/* Used also for sha256 */
-void FAST_FUNC sha1_hash(const void *buffer, size_t len, sha1_ctx_t *ctx)
+void FAST_FUNC sha1_hash(sha1_ctx_t *ctx, const void *buffer, size_t len)
{
unsigned in_buf = ctx->total64 & 63;
unsigned add = 64 - in_buf;
@@ -380,7 +380,7 @@ void FAST_FUNC sha1_hash(const void *buffer, size_t len, sha1_ctx_t *ctx)
memcpy(ctx->wbuffer + in_buf, buffer, len);
}
-void FAST_FUNC sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx)
+void FAST_FUNC sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len)
{
unsigned in_buf = ctx->total64[0] & 127;
unsigned add = 128 - in_buf;
@@ -406,7 +406,7 @@ void FAST_FUNC sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx)
/* Used also for sha256 */
-void FAST_FUNC sha1_end(void *resbuf, sha1_ctx_t *ctx)
+void FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf)
{
unsigned pad, in_buf;
@@ -442,7 +442,7 @@ void FAST_FUNC sha1_end(void *resbuf, sha1_ctx_t *ctx)
memcpy(resbuf, ctx->hash, sizeof(ctx->hash[0]) * in_buf);
}
-void FAST_FUNC sha512_end(void *resbuf, sha512_ctx_t *ctx)
+void FAST_FUNC sha512_end(sha512_ctx_t *ctx, void *resbuf)
{
unsigned pad, in_buf;