diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 20:45:27 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-10-16 20:45:27 +0200 |
commit | c0683acce88efc1fe15d9a4332428b5a9fdc6c2e (patch) | |
tree | cb0f5bb99b5e5f4490be175238d3a877115bc468 /libbb/sha1.c | |
parent | 1a5e11c874a1f53c5205140a9d675b7e6404bbc9 (diff) | |
download | busybox-w32-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.tar.gz busybox-w32-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.tar.bz2 busybox-w32-c0683acce88efc1fe15d9a4332428b5a9fdc6c2e.zip |
*: 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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/sha1.c b/libbb/sha1.c index beeb70cf6..fac23c0ec 100644 --- a/libbb/sha1.c +++ b/libbb/sha1.c | |||
@@ -361,7 +361,7 @@ void FAST_FUNC sha512_begin(sha512_ctx_t *ctx) | |||
361 | 361 | ||
362 | 362 | ||
363 | /* Used also for sha256 */ | 363 | /* Used also for sha256 */ |
364 | void FAST_FUNC sha1_hash(const void *buffer, size_t len, sha1_ctx_t *ctx) | 364 | void FAST_FUNC sha1_hash(sha1_ctx_t *ctx, const void *buffer, size_t len) |
365 | { | 365 | { |
366 | unsigned in_buf = ctx->total64 & 63; | 366 | unsigned in_buf = ctx->total64 & 63; |
367 | unsigned add = 64 - in_buf; | 367 | unsigned add = 64 - in_buf; |
@@ -380,7 +380,7 @@ void FAST_FUNC sha1_hash(const void *buffer, size_t len, sha1_ctx_t *ctx) | |||
380 | memcpy(ctx->wbuffer + in_buf, buffer, len); | 380 | memcpy(ctx->wbuffer + in_buf, buffer, len); |
381 | } | 381 | } |
382 | 382 | ||
383 | void FAST_FUNC sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) | 383 | void FAST_FUNC sha512_hash(sha512_ctx_t *ctx, const void *buffer, size_t len) |
384 | { | 384 | { |
385 | unsigned in_buf = ctx->total64[0] & 127; | 385 | unsigned in_buf = ctx->total64[0] & 127; |
386 | unsigned add = 128 - in_buf; | 386 | unsigned add = 128 - in_buf; |
@@ -406,7 +406,7 @@ void FAST_FUNC sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) | |||
406 | 406 | ||
407 | 407 | ||
408 | /* Used also for sha256 */ | 408 | /* Used also for sha256 */ |
409 | void FAST_FUNC sha1_end(void *resbuf, sha1_ctx_t *ctx) | 409 | void FAST_FUNC sha1_end(sha1_ctx_t *ctx, void *resbuf) |
410 | { | 410 | { |
411 | unsigned pad, in_buf; | 411 | unsigned pad, in_buf; |
412 | 412 | ||
@@ -442,7 +442,7 @@ void FAST_FUNC sha1_end(void *resbuf, sha1_ctx_t *ctx) | |||
442 | memcpy(resbuf, ctx->hash, sizeof(ctx->hash[0]) * in_buf); | 442 | memcpy(resbuf, ctx->hash, sizeof(ctx->hash[0]) * in_buf); |
443 | } | 443 | } |
444 | 444 | ||
445 | void FAST_FUNC sha512_end(void *resbuf, sha512_ctx_t *ctx) | 445 | void FAST_FUNC sha512_end(sha512_ctx_t *ctx, void *resbuf) |
446 | { | 446 | { |
447 | unsigned pad, in_buf; | 447 | unsigned pad, in_buf; |
448 | 448 | ||