-/* scrypt.c */
/*
* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
* 2015.
#include <openssl/err.h>
#include <internal/numbers.h>
+#ifndef OPENSSL_NO_SCRYPT
+
#define R(a,b) (((a) << (b)) | ((a) >> (32 - (b))))
static void salsa208_word_specification(uint32_t inout[16])
{
*pV = *pB++;
*pV |= *pB++ << 8;
*pV |= *pB++ << 16;
- *pV |= *pB++ << 24;
+ *pV |= (uint32_t)*pB++ << 24;
}
for (i = 1; i < N; i++, pV += 32 * r)
return 1;
B = OPENSSL_malloc(Blen + Vlen);
- if (B == 0)
+ if (B == NULL)
return 0;
X = (uint32_t *)(B + Blen);
T = X + 32 * r;
OPENSSL_clear_free(B, Blen + Vlen);
return rv;
}
+#endif