forked from wolfSSL/wolfssl
@@ -104,7 +104,7 @@ enum {
|
||||
|
||||
/* HMAC */
|
||||
typedef struct CRYPT_HMAC_CTX {
|
||||
long long holder[68]; /* big enough to hold internal, but check on init */
|
||||
long long holder[69]; /* big enough to hold internal, but check on init */
|
||||
} CRYPT_HMAC_CTX;
|
||||
|
||||
int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX*, int, const unsigned char*, unsigned int);
|
||||
|
@@ -499,7 +499,7 @@ static int _Transform(Sha512* sha512)
|
||||
|
||||
static INLINE void AddLength(Sha512* sha512, word32 len)
|
||||
{
|
||||
word32 tmp = sha512->loLen;
|
||||
word64 tmp = sha512->loLen;
|
||||
if ( (sha512->loLen += len) < tmp)
|
||||
sha512->hiLen++; /* carry low to high */
|
||||
}
|
||||
@@ -1418,7 +1418,7 @@ static int _Transform384(Sha384* sha384)
|
||||
|
||||
static INLINE void AddLength384(Sha384* sha384, word32 len)
|
||||
{
|
||||
word32 tmp = sha384->loLen;
|
||||
word64 tmp = sha384->loLen;
|
||||
if ( (sha384->loLen += len) < tmp)
|
||||
sha384->hiLen++; /* carry low to high */
|
||||
}
|
||||
|
@@ -54,8 +54,8 @@ enum {
|
||||
/* Sha512 digest */
|
||||
typedef struct Sha512 {
|
||||
word32 buffLen; /* in bytes */
|
||||
word32 loLen; /* length in bytes */
|
||||
word32 hiLen; /* length in bytes */
|
||||
word64 loLen; /* length in bytes */
|
||||
word64 hiLen; /* length in bytes */
|
||||
word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)];
|
||||
word64 buffer[SHA512_BLOCK_SIZE / sizeof(word64)];
|
||||
} Sha512;
|
||||
@@ -81,8 +81,8 @@ enum {
|
||||
/* Sha384 digest */
|
||||
typedef struct Sha384 {
|
||||
word32 buffLen; /* in bytes */
|
||||
word32 loLen; /* length in bytes */
|
||||
word32 hiLen; /* length in bytes */
|
||||
word64 loLen; /* length in bytes */
|
||||
word64 hiLen; /* length in bytes */
|
||||
word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; /* for transform 512 */
|
||||
word64 buffer[SHA384_BLOCK_SIZE / sizeof(word64)];
|
||||
} Sha384;
|
||||
|
Reference in New Issue
Block a user