summaryrefslogtreecommitdiff
path: root/ext/digest/sha1/sha1.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/sha1/sha1.c')
-rw-r--r--ext/digest/sha1/sha1.c16
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];