diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-11 01:38:04 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-11 01:38:04 +0000 |
commit | e9b9a19ad30e004b3532105af417e43575ce7779 (patch) | |
tree | 149fe884916ee0be75e384fbcbb908695499c8d7 /include | |
parent | 6f05874b9dc4623512878566d144b0905700525d (diff) | |
download | busybox-w32-e9b9a19ad30e004b3532105af417e43575ce7779.tar.gz busybox-w32-e9b9a19ad30e004b3532105af417e43575ce7779.tar.bz2 busybox-w32-e9b9a19ad30e004b3532105af417e43575ce7779.zip |
libbb: disable a second md5 implementation which managed to creep in :)
function old new delta
sha512_end 239 237 -2
sha256_end 162 160 -2
sha1_end 191 189 -2
md5_end 168 166 -2
__md5__magic 4 - -4
md5_crypt 627 621 -6
static.S 16 - -16
__md5_Init 42 - -42
static.P 64 - -64
__md5_Final 131 - -131
__md5_Update 153 - -153
static.C 268 12 -256
__md5_Transform 293 - -293
------------------------------------------------------------------------------
(add/remove: 0/7 grow/shrink: 0/6 up/down: 0/-973) Total: -973 bytes
Diffstat (limited to 'include')
-rw-r--r-- | include/libbb.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/include/libbb.h b/include/libbb.h index 839a0de49..85a915ec1 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1309,7 +1309,7 @@ typedef struct sha1_ctx_t { | |||
1309 | } sha1_ctx_t; | 1309 | } sha1_ctx_t; |
1310 | void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC; | 1310 | void sha1_begin(sha1_ctx_t *ctx) FAST_FUNC; |
1311 | void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC; | 1311 | void sha1_hash(const void *data, size_t length, sha1_ctx_t *ctx) FAST_FUNC; |
1312 | void *sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC; | 1312 | void sha1_end(void *resbuf, sha1_ctx_t *ctx) FAST_FUNC; |
1313 | typedef struct sha256_ctx_t { | 1313 | typedef struct sha256_ctx_t { |
1314 | uint32_t H[8]; | 1314 | uint32_t H[8]; |
1315 | uint32_t total[2]; /* rename to "count"? */ | 1315 | uint32_t total[2]; /* rename to "count"? */ |
@@ -1318,7 +1318,7 @@ typedef struct sha256_ctx_t { | |||
1318 | } sha256_ctx_t; | 1318 | } sha256_ctx_t; |
1319 | void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC; | 1319 | void sha256_begin(sha256_ctx_t *ctx) FAST_FUNC; |
1320 | void sha256_hash(const void *buffer, size_t len, sha256_ctx_t *ctx) FAST_FUNC; | 1320 | void sha256_hash(const void *buffer, size_t len, sha256_ctx_t *ctx) FAST_FUNC; |
1321 | void* sha256_end(void *resbuf, sha256_ctx_t *ctx) FAST_FUNC; | 1321 | void sha256_end(void *resbuf, sha256_ctx_t *ctx) FAST_FUNC; |
1322 | typedef struct sha512_ctx_t { | 1322 | typedef struct sha512_ctx_t { |
1323 | uint64_t H[8]; | 1323 | uint64_t H[8]; |
1324 | uint64_t total[2]; | 1324 | uint64_t total[2]; |
@@ -1327,7 +1327,8 @@ typedef struct sha512_ctx_t { | |||
1327 | } sha512_ctx_t; | 1327 | } sha512_ctx_t; |
1328 | void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC; | 1328 | void sha512_begin(sha512_ctx_t *ctx) FAST_FUNC; |
1329 | void sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) FAST_FUNC; | 1329 | void sha512_hash(const void *buffer, size_t len, sha512_ctx_t *ctx) FAST_FUNC; |
1330 | void* sha512_end(void *resbuf, sha512_ctx_t *ctx) FAST_FUNC; | 1330 | void sha512_end(void *resbuf, sha512_ctx_t *ctx) FAST_FUNC; |
1331 | #if 1 | ||
1331 | typedef struct md5_ctx_t { | 1332 | typedef struct md5_ctx_t { |
1332 | uint32_t A; | 1333 | uint32_t A; |
1333 | uint32_t B; | 1334 | uint32_t B; |
@@ -1337,9 +1338,18 @@ typedef struct md5_ctx_t { | |||
1337 | uint32_t buflen; | 1338 | uint32_t buflen; |
1338 | char buffer[128]; | 1339 | char buffer[128]; |
1339 | } md5_ctx_t; | 1340 | } md5_ctx_t; |
1341 | #else | ||
1342 | /* libbb/md5prime.c uses a bit different one: */ | ||
1343 | typedef struct md5_ctx_t { | ||
1344 | uint32_t state[4]; /* state (ABCD) */ | ||
1345 | uint32_t count[2]; /* number of bits, modulo 2^64 (lsb first) */ | ||
1346 | unsigned char buffer[64]; /* input buffer */ | ||
1347 | } md5_ctx_t; | ||
1348 | #endif | ||
1340 | void md5_begin(md5_ctx_t *ctx) FAST_FUNC; | 1349 | void md5_begin(md5_ctx_t *ctx) FAST_FUNC; |
1341 | void md5_hash(const void *data, size_t length, md5_ctx_t *ctx) FAST_FUNC; | 1350 | void md5_hash(const void *data, size_t length, md5_ctx_t *ctx) FAST_FUNC; |
1342 | void *md5_end(void *resbuf, md5_ctx_t *ctx) FAST_FUNC; | 1351 | void md5_end(void *resbuf, md5_ctx_t *ctx) FAST_FUNC; |
1352 | |||
1343 | 1353 | ||
1344 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; | 1354 | uint32_t *crc32_filltable(uint32_t *tbl256, int endian) FAST_FUNC; |
1345 | 1355 | ||