1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-20 02:25:14 -07:00

In crypto_hash() lengths are ULL, so dont loop using and int value

This commit is contained in:
Frank Denis 2013-04-26 23:00:51 -07:00
parent a669e9353d
commit c2b6529577
4 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long in
{
unsigned char h[32];
unsigned char padded[128];
int i;
unsigned long long i;
unsigned long long bits = 512 + (inlen << 3);
for (i = 0;i < 32;++i) h[i] = iv[i];

View File

@ -26,7 +26,7 @@ int crypto_auth(unsigned char *out,const unsigned char *in,unsigned long long in
{
unsigned char h[64];
unsigned char padded[256];
int i;
unsigned long long i;
unsigned long long bytes = 128 + inlen;
for (i = 0;i < 64;++i) h[i] = iv[i];

View File

@ -26,7 +26,7 @@ int crypto_hash(unsigned char *out,const unsigned char *in,unsigned long long in
{
unsigned char h[32];
unsigned char padded[128];
int i;
unsigned long long i;
unsigned long long bits = inlen << 3;
for (i = 0;i < 32;++i) h[i] = iv[i];

View File

@ -26,7 +26,7 @@ int crypto_hash(unsigned char *out,const unsigned char *in,unsigned long long in
{
unsigned char h[64];
unsigned char padded[256];
int i;
unsigned long long i;
unsigned long long bytes = inlen;
for (i = 0;i < 64;++i) h[i] = iv[i];