summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/md4/md4_dgst.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/md4/md4_dgst.c')
-rw-r--r--crypto/openssl/crypto/md4/md4_dgst.c39
1 files changed, 6 insertions, 33 deletions
diff --git a/crypto/openssl/crypto/md4/md4_dgst.c b/crypto/openssl/crypto/md4/md4_dgst.c
index 81488ae..7afb718 100644
--- a/crypto/openssl/crypto/md4/md4_dgst.c
+++ b/crypto/openssl/crypto/md4/md4_dgst.c
@@ -70,7 +70,7 @@ const char *MD4_version="MD4" OPENSSL_VERSION_PTEXT;
#define INIT_DATA_C (unsigned long)0x98badcfeL
#define INIT_DATA_D (unsigned long)0x10325476L
-void MD4_Init(MD4_CTX *c)
+int MD4_Init(MD4_CTX *c)
{
c->A=INIT_DATA_A;
c->B=INIT_DATA_B;
@@ -79,27 +79,14 @@ void MD4_Init(MD4_CTX *c)
c->Nl=0;
c->Nh=0;
c->num=0;
+ return 1;
}
#ifndef md4_block_host_order
void md4_block_host_order (MD4_CTX *c, const void *data, int num)
{
const MD4_LONG *X=data;
- register unsigned long A,B,C,D;
- /*
- * In case you wonder why A-D are declared as long and not
- * as MD4_LONG. Doing so results in slight performance
- * boost on LP64 architectures. The catch is we don't
- * really care if 32 MSBs of a 64-bit register get polluted
- * with eventual overflows as we *save* only 32 LSBs in
- * *either* case. Now declaring 'em long excuses the compiler
- * from keeping 32 MSBs zeroed resulting in 13% performance
- * improvement under SPARC Solaris7/64 and 5% under AlphaLinux.
- * Well, to be honest it should say that this *prevents*
- * performance degradation.
- *
- * <appro@fy.chalmers.se>
- */
+ register unsigned MD32_REG_T A,B,C,D;
A=c->A;
B=c->B;
@@ -175,25 +162,11 @@ void md4_block_host_order (MD4_CTX *c, const void *data, int num)
void md4_block_data_order (MD4_CTX *c, const void *data_, int num)
{
const unsigned char *data=data_;
- register unsigned long A,B,C,D,l;
- /*
- * In case you wonder why A-D are declared as long and not
- * as MD4_LONG. Doing so results in slight performance
- * boost on LP64 architectures. The catch is we don't
- * really care if 32 MSBs of a 64-bit register get polluted
- * with eventual overflows as we *save* only 32 LSBs in
- * *either* case. Now declaring 'em long excuses the compiler
- * from keeping 32 MSBs zeroed resulting in 13% performance
- * improvement under SPARC Solaris7/64 and 5% under AlphaLinux.
- * Well, to be honest it should say that this *prevents*
- * performance degradation.
- *
- * <appro@fy.chalmers.se>
- */
+ register unsigned MD32_REG_T A,B,C,D,l;
#ifndef MD32_XARRAY
/* See comment in crypto/sha/sha_locl.h for details. */
- unsigned long XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
- XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15;
+ unsigned MD32_REG_T XX0, XX1, XX2, XX3, XX4, XX5, XX6, XX7,
+ XX8, XX9,XX10,XX11,XX12,XX13,XX14,XX15;
# define X(i) XX##i
#else
MD4_LONG XX[MD4_LBLOCK];
OpenPOWER on IntegriCloud