mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 04:04:39 +02:00
@@ -104,7 +104,7 @@ enum {
|
|||||||
|
|
||||||
/* HMAC */
|
/* HMAC */
|
||||||
typedef struct CRYPT_HMAC_CTX {
|
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;
|
} CRYPT_HMAC_CTX;
|
||||||
|
|
||||||
int CRYPT_HMAC_SetKey(CRYPT_HMAC_CTX*, int, const unsigned char*, unsigned int);
|
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)
|
static INLINE void AddLength(Sha512* sha512, word32 len)
|
||||||
{
|
{
|
||||||
word32 tmp = sha512->loLen;
|
word64 tmp = sha512->loLen;
|
||||||
if ( (sha512->loLen += len) < tmp)
|
if ( (sha512->loLen += len) < tmp)
|
||||||
sha512->hiLen++; /* carry low to high */
|
sha512->hiLen++; /* carry low to high */
|
||||||
}
|
}
|
||||||
@@ -1418,7 +1418,7 @@ static int _Transform384(Sha384* sha384)
|
|||||||
|
|
||||||
static INLINE void AddLength384(Sha384* sha384, word32 len)
|
static INLINE void AddLength384(Sha384* sha384, word32 len)
|
||||||
{
|
{
|
||||||
word32 tmp = sha384->loLen;
|
word64 tmp = sha384->loLen;
|
||||||
if ( (sha384->loLen += len) < tmp)
|
if ( (sha384->loLen += len) < tmp)
|
||||||
sha384->hiLen++; /* carry low to high */
|
sha384->hiLen++; /* carry low to high */
|
||||||
}
|
}
|
||||||
|
@@ -54,8 +54,8 @@ enum {
|
|||||||
/* Sha512 digest */
|
/* Sha512 digest */
|
||||||
typedef struct Sha512 {
|
typedef struct Sha512 {
|
||||||
word32 buffLen; /* in bytes */
|
word32 buffLen; /* in bytes */
|
||||||
word32 loLen; /* length in bytes */
|
word64 loLen; /* length in bytes */
|
||||||
word32 hiLen; /* length in bytes */
|
word64 hiLen; /* length in bytes */
|
||||||
word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)];
|
word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)];
|
||||||
word64 buffer[SHA512_BLOCK_SIZE / sizeof(word64)];
|
word64 buffer[SHA512_BLOCK_SIZE / sizeof(word64)];
|
||||||
} Sha512;
|
} Sha512;
|
||||||
@@ -81,8 +81,8 @@ enum {
|
|||||||
/* Sha384 digest */
|
/* Sha384 digest */
|
||||||
typedef struct Sha384 {
|
typedef struct Sha384 {
|
||||||
word32 buffLen; /* in bytes */
|
word32 buffLen; /* in bytes */
|
||||||
word32 loLen; /* length in bytes */
|
word64 loLen; /* length in bytes */
|
||||||
word32 hiLen; /* length in bytes */
|
word64 hiLen; /* length in bytes */
|
||||||
word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; /* for transform 512 */
|
word64 digest[SHA512_DIGEST_SIZE / sizeof(word64)]; /* for transform 512 */
|
||||||
word64 buffer[SHA384_BLOCK_SIZE / sizeof(word64)];
|
word64 buffer[SHA384_BLOCK_SIZE / sizeof(word64)];
|
||||||
} Sha384;
|
} Sha384;
|
||||||
|
Reference in New Issue
Block a user