QRCode support is always enabled now;
[novacoin.git] / src / crypto / scrypt / generic / scrypt-generic.cpp
similarity index 96%
rename from src/scrypt-generic.cpp
rename to src/crypto/scrypt/generic/scrypt-generic.cpp
index aa07892..c4dc5b5 100644 (file)
@@ -119,15 +119,14 @@ uint256 scrypt_blockhash(const uint8_t* input)
 
     PKCS5_PBKDF2_HMAC((const char*)input, 80, input, 80, 1, EVP_sha256(), 128, (unsigned char *)X);
 
-    uint16_t i, j, k;
-    for (i = 0; i < 1024; i++) {
+    for (uint16_t i = 0; i < 1024; i++) {
         memcpy(&V[i * 32], X, 128);
         xor_salsa8(&X[0], &X[16]);
         xor_salsa8(&X[16], &X[0]);
     }
-    for (i = 0; i < 1024; i++) {
-        j = 32 * (X[16] & 1023);
-        for (k = 0; k < 32; k++)
+    for (uint16_t i = 0; i < 1024; i++) {
+        uint16_t j = 32 * (X[16] & 1023);
+        for (uint16_t k = 0; k < 32; k++)
             X[k] ^= V[j + k];
         xor_salsa8(&X[0], &X[16]);
         xor_salsa8(&X[16], &X[0]);