diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-10 05:01:33 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-10-10 05:01:33 +0000 |
commit | 9b2fa26be45b051ebdfc2cf06a13aff0caf58c00 (patch) | |
tree | 8818dd11554f69d2861cd20e9396b6227d976453 /ext/digest/sha1/sha1.c | |
parent | 6d83e40c327df4fbd3214815022ab66a215ce995 (diff) |
* ext/digest: Merge from trunk; apply all changes since the
initial import, except for the removal of compatibility stub
libraries (md5.rb and sha1.rb).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11117 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/sha1/sha1.c')
-rw-r--r-- | ext/digest/sha1/sha1.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ext/digest/sha1/sha1.c b/ext/digest/sha1/sha1.c index 1012ef8751..6545744bed 100644 --- a/ext/digest/sha1/sha1.c +++ b/ext/digest/sha1/sha1.c @@ -129,9 +129,7 @@ do_R4(uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d, uint32_t *e, CHAR64LON /* * Hash a single 512-bit block. This is the core of the algorithm. */ -void SHA1_Transform(state, buffer) - uint32_t state[5]; - const uint8_t buffer[64]; +void SHA1_Transform(uint32_t state[5], const uint8_t buffer[64]) { uint32_t a, b, c, d, e; CHAR64LONG16 *block; @@ -201,8 +199,7 @@ void SHA1_Transform(state, buffer) /* * SHA1_Init - Initialize new context */ -void SHA1_Init(context) - SHA1_CTX *context; +void SHA1_Init(SHA1_CTX *context) { _DIAGASSERT(context != 0); @@ -220,10 +217,7 @@ void SHA1_Init(context) /* * Run your data through this. */ -void SHA1_Update(context, data, len) - SHA1_CTX *context; - const uint8_t *data; - size_t len; +void SHA1_Update(SHA1_CTX *context, const uint8_t *data, size_t len) { uint32_t i, j; @@ -250,9 +244,7 @@ void SHA1_Update(context, data, len) /* * Add padding and return the message digest. */ -void SHA1_Final(digest, context) - uint8_t digest[20]; - SHA1_CTX* context; +void SHA1_Finish(SHA1_CTX* context, uint8_t digest[20]) { size_t i; uint8_t finalcount[8]; |