diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-10 13:32:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-11-10 13:32:50 +0000 |
commit | 56dceb9b7722193ef53fb1afb981f1289eecb0b0 (patch) | |
tree | 105363bf752df3c53e3d1165c8668af1983d5742 /include/libbb.h | |
parent | c028ec280a71c45ba71bb4712db1968391a440cc (diff) | |
download | busybox-w32-56dceb9b7722193ef53fb1afb981f1289eecb0b0.tar.gz busybox-w32-56dceb9b7722193ef53fb1afb981f1289eecb0b0.tar.bz2 busybox-w32-56dceb9b7722193ef53fb1afb981f1289eecb0b0.zip |
sha256,sha512: new applets. +4.9kb
we will require sha256/512 code for new $5$ and $6$ style
password hashes anyway, they are showing up already
in people's /etc/passwd...
Diffstat (limited to 'include/libbb.h')
-rw-r--r-- | include/libbb.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index b0f6eaee2..839a0de49 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
@@ -1310,7 +1310,24 @@ typedef struct 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 | 1313 | typedef struct sha256_ctx_t { | |
1314 | uint32_t H[8]; | ||
1315 | uint32_t total[2]; /* rename to "count"? */ | ||
1316 | uint32_t buflen; | ||
1317 | char buffer[128]; /* NB: always correctly aligned for uint32_t */ | ||
1318 | } sha256_ctx_t; | ||
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; | ||
1321 | void* sha256_end(void *resbuf, sha256_ctx_t *ctx) FAST_FUNC; | ||
1322 | typedef struct sha512_ctx_t { | ||
1323 | uint64_t H[8]; | ||
1324 | uint64_t total[2]; | ||
1325 | uint64_t buflen; | ||
1326 | char buffer[256]; /* NB: always correctly aligned for uint64_t */ | ||
1327 | } sha512_ctx_t; | ||
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; | ||
1330 | void* sha512_end(void *resbuf, sha512_ctx_t *ctx) FAST_FUNC; | ||
1314 | typedef struct md5_ctx_t { | 1331 | typedef struct md5_ctx_t { |
1315 | uint32_t A; | 1332 | uint32_t A; |
1316 | uint32_t B; | 1333 | uint32_t B; |