projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Further synchronizations with md32_common.h update, consistent naming
[openssl.git]
/
crypto
/
sha
/
sha512.c
diff --git
a/crypto/sha/sha512.c
b/crypto/sha/sha512.c
index dba4c49c0b879b2aed63c2f6a73d563341495f7c..e7a7e5dea8b21c8a49039aa5ec243a54a4b83d50 100644
(file)
--- a/
crypto/sha/sha512.c
+++ b/
crypto/sha/sha512.c
@@
-89,7
+89,7
@@
int SHA512_Init (SHA512_CTX *c)
#ifndef SHA512_ASM
static
#endif
#ifndef SHA512_ASM
static
#endif
-void sha512_block (SHA512_CTX *ctx, const void *in, size_t num);
+void sha512_block
_data_order
(SHA512_CTX *ctx, const void *in, size_t num);
int SHA512_Final (unsigned char *md, SHA512_CTX *c)
{
int SHA512_Final (unsigned char *md, SHA512_CTX *c)
{
@@
-100,7
+100,7
@@
int SHA512_Final (unsigned char *md, SHA512_CTX *c)
n++;
if (n > (sizeof(c->u)-16))
memset (p+n,0,sizeof(c->u)-n), n=0,
n++;
if (n > (sizeof(c->u)-16))
memset (p+n,0,sizeof(c->u)-n), n=0,
- sha512_block (c,p,1);
+ sha512_block
_data_order
(c,p,1);
memset (p+n,0,sizeof(c->u)-16-n);
#ifdef B_ENDIAN
memset (p+n,0,sizeof(c->u)-16-n);
#ifdef B_ENDIAN
@@
-125,7
+125,7
@@
int SHA512_Final (unsigned char *md, SHA512_CTX *c)
p[sizeof(c->u)-16] = (unsigned char)(c->Nh>>56);
#endif
p[sizeof(c->u)-16] = (unsigned char)(c->Nh>>56);
#endif
- sha512_block (c,p,1);
+ sha512_block
_data_order
(c,p,1);
if (md==0) return 0;
if (md==0) return 0;
@@
-197,7
+197,7
@@
int SHA512_Update (SHA512_CTX *c, const void *_data, size_t len)
else {
memcpy (p+c->num,data,n), c->num = 0;
len-=n, data+=n;
else {
memcpy (p+c->num,data,n), c->num = 0;
len-=n, data+=n;
- sha512_block (c,p,1);
+ sha512_block
_data_order
(c,p,1);
}
}
}
}
@@
-207,12
+207,12
@@
int SHA512_Update (SHA512_CTX *c, const void *_data, size_t len)
if ((size_t)data%sizeof(c->u.d[0]) != 0)
while (len >= sizeof(c->u))
memcpy (p,data,sizeof(c->u)),
if ((size_t)data%sizeof(c->u.d[0]) != 0)
while (len >= sizeof(c->u))
memcpy (p,data,sizeof(c->u)),
- sha512_block (c,p,1),
+ sha512_block
_data_order
(c,p,1),
len -= sizeof(c->u),
data += sizeof(c->u);
else
#endif
len -= sizeof(c->u),
data += sizeof(c->u);
else
#endif
- sha512_block (c,data,len/sizeof(c->u)),
+ sha512_block
_data_order
(c,data,len/sizeof(c->u)),
data += len,
len %= sizeof(c->u),
data -= len;
data += len,
len %= sizeof(c->u),
data -= len;
@@
-227,7
+227,7
@@
int SHA384_Update (SHA512_CTX *c, const void *data, size_t len)
{ return SHA512_Update (c,data,len); }
void SHA512_Transform (SHA512_CTX *c, const unsigned char *data)
{ return SHA512_Update (c,data,len); }
void SHA512_Transform (SHA512_CTX *c, const unsigned char *data)
-{ sha512_block (c,data,1); }
+{ sha512_block
_data_order
(c,data,1); }
unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md)
{
unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md)
{
@@
-392,7
+392,7
@@
static const SHA_LONG64 K512[80] = {
#ifdef OPENSSL_SMALL_FOOTPRINT
#ifdef OPENSSL_SMALL_FOOTPRINT
-static void sha512_block (SHA512_CTX *ctx, const void *in, size_t num)
+static void sha512_block
_data_order
(SHA512_CTX *ctx, const void *in, size_t num)
{
const SHA_LONG64 *W=in;
SHA_LONG64 a,b,c,d,e,f,g,h,s0,s1,T1,T2;
{
const SHA_LONG64 *W=in;
SHA_LONG64 a,b,c,d,e,f,g,h,s0,s1,T1,T2;
@@
-453,7
+453,7
@@
static void sha512_block (SHA512_CTX *ctx, const void *in, size_t num)
T1 = X[(i)&0x0f] += s0 + s1 + X[(i+9)&0x0f]; \
ROUND_00_15(i,a,b,c,d,e,f,g,h); } while (0)
T1 = X[(i)&0x0f] += s0 + s1 + X[(i+9)&0x0f]; \
ROUND_00_15(i,a,b,c,d,e,f,g,h); } while (0)
-static void sha512_block (SHA512_CTX *ctx, const void *in, size_t num)
+static void sha512_block
_data_order
(SHA512_CTX *ctx, const void *in, size_t num)
{
const SHA_LONG64 *W=in;
SHA_LONG64 a,b,c,d,e,f,g,h,s0,s1,T1;
{
const SHA_LONG64 *W=in;
SHA_LONG64 a,b,c,d,e,f,g,h,s0,s1,T1;