summaryrefslogtreecommitdiff
path: root/ext/digest/rmd160
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/rmd160')
-rw-r--r--ext/digest/rmd160/rmd160.c6
-rw-r--r--ext/digest/rmd160/rmd160.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/ext/digest/rmd160/rmd160.c b/ext/digest/rmd160/rmd160.c
index bac77833b1..058d004f3a 100644
--- a/ext/digest/rmd160/rmd160.c
+++ b/ext/digest/rmd160/rmd160.c
@@ -124,7 +124,7 @@
/********************************************************************/
-void
+int
RMD160_Init(RMD160_CTX *context)
{
@@ -138,6 +138,7 @@ RMD160_Init(RMD160_CTX *context)
context->state[4] = 0xc3d2e1f0U;
context->length[0] = context->length[1] = 0;
context->buflen = 0;
+ return 1;
}
/********************************************************************/
@@ -412,7 +413,7 @@ RMD160_Update(RMD160_CTX *context, const uint8_t *data, size_t nbytes)
/********************************************************************/
-void
+int
RMD160_Finish(RMD160_CTX *context, uint8_t digest[20])
{
uint32_t i;
@@ -456,6 +457,7 @@ RMD160_Finish(RMD160_CTX *context, uint8_t digest[20])
digest[i + 3] = (context->state[i>>2] >> 24);
}
}
+ return 1;
}
/************************ end of file rmd160.c **********************/
diff --git a/ext/digest/rmd160/rmd160.h b/ext/digest/rmd160/rmd160.h
index 2c98f11cd0..098fa05a88 100644
--- a/ext/digest/rmd160/rmd160.h
+++ b/ext/digest/rmd160/rmd160.h
@@ -43,10 +43,10 @@ typedef struct {
#endif
__BEGIN_DECLS
-void RMD160_Init _((RMD160_CTX *));
+int RMD160_Init _((RMD160_CTX *));
void RMD160_Transform _((uint32_t[5], const uint32_t[16]));
void RMD160_Update _((RMD160_CTX *, const uint8_t *, size_t));
-void RMD160_Finish _((RMD160_CTX *, uint8_t[20]));
+int RMD160_Finish _((RMD160_CTX *, uint8_t[20]));
__END_DECLS
#define RMD160_BLOCK_LENGTH 64