summaryrefslogtreecommitdiff
path: root/ext/digest/rmd160
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/rmd160')
-rw-r--r--ext/digest/rmd160/rmd160.c7
-rw-r--r--ext/digest/rmd160/rmd160.h2
-rw-r--r--ext/digest/rmd160/rmd160init.c1
-rw-r--r--ext/digest/rmd160/rmd160ossl.c14
-rw-r--r--ext/digest/rmd160/rmd160ossl.h1
5 files changed, 0 insertions, 25 deletions
diff --git a/ext/digest/rmd160/rmd160.c b/ext/digest/rmd160/rmd160.c
index 64ec0fb4275..88918728cd5 100644
--- a/ext/digest/rmd160/rmd160.c
+++ b/ext/digest/rmd160/rmd160.c
@@ -454,11 +454,4 @@ RMD160_Finish(RMD160_CTX *context, uint8_t digest[20])
}
}
-int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
- return pctx1->buflen == pctx2->buflen
- && memcmp(pctx1->length, pctx2->length, sizeof(pctx1->length)) == 0
- && memcmp(pctx1->state, pctx2->state, sizeof(pctx1->state)) == 0
- && memcmp(pctx1->bbuffer, pctx2->bbuffer, sizeof(pctx1->bbuffer)) == 0;
-}
-
/************************ end of file rmd160.c **********************/
diff --git a/ext/digest/rmd160/rmd160.h b/ext/digest/rmd160/rmd160.h
index ac52fb0ec3a..54d1ca9140a 100644
--- a/ext/digest/rmd160/rmd160.h
+++ b/ext/digest/rmd160/rmd160.h
@@ -40,7 +40,6 @@ typedef struct {
#define RMD160_Transform rb_Digest_RMD160_Transform
#define RMD160_Update rb_Digest_RMD160_Update
#define RMD160_Finish rb_Digest_RMD160_Finish
-#define RMD160_Equal rb_Digest_RMD160_Equal
#endif
__BEGIN_DECLS
@@ -48,7 +47,6 @@ void 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_Equal _((RMD160_CTX *, RMD160_CTX *));
__END_DECLS
#define RMD160_BLOCK_LENGTH 64
diff --git a/ext/digest/rmd160/rmd160init.c b/ext/digest/rmd160/rmd160init.c
index 08f3f1fd72f..896756723b5 100644
--- a/ext/digest/rmd160/rmd160init.c
+++ b/ext/digest/rmd160/rmd160init.c
@@ -14,7 +14,6 @@ static algo_t rmd160 = {
(hash_init_func_t)RMD160_Init,
(hash_update_func_t)RMD160_Update,
(hash_finish_func_t)RMD160_Finish,
- (hash_equal_func_t)RMD160_Equal,
};
void
diff --git a/ext/digest/rmd160/rmd160ossl.c b/ext/digest/rmd160/rmd160ossl.c
index 247fd04afdf..5d8c5ba470a 100644
--- a/ext/digest/rmd160/rmd160ossl.c
+++ b/ext/digest/rmd160/rmd160ossl.c
@@ -2,21 +2,7 @@
#include "defs.h"
#include "rmd160ossl.h"
-#include <assert.h>
-#include <stdlib.h>
void RMD160_Finish(RMD160_CTX *ctx, char *buf) {
RIPEMD160_Final(buf, ctx);
}
-
-int RMD160_Equal(RMD160_CTX* pctx1, RMD160_CTX* pctx2) {
- return pctx1->num == pctx2->num
- && pctx1->A == pctx2->A
- && pctx1->B == pctx2->B
- && pctx1->C == pctx2->C
- && pctx1->D == pctx2->D
- && pctx1->E == pctx2->E
- && pctx1->Nl == pctx2->Nl
- && pctx1->Nh == pctx2->Nh
- && memcmp(pctx1->data, pctx2->data, sizeof(pctx1->data)) == 0;
-}
diff --git a/ext/digest/rmd160/rmd160ossl.h b/ext/digest/rmd160/rmd160ossl.h
index ea6bd57cc62..3df38a01c0d 100644
--- a/ext/digest/rmd160/rmd160ossl.h
+++ b/ext/digest/rmd160/rmd160ossl.h
@@ -15,6 +15,5 @@
#define RMD160_DIGEST_LENGTH RIPEMD160_DIGEST_LENGTH
void RMD160_Finish(RMD160_CTX *ctx, char *buf);
-int RMD160_Equal(RMD160_CTX *pctx1, RMD160_CTX *pctx2);
#endif