From 2135777cac4b1522112f5b097674490150a25dd2 Mon Sep 17 00:00:00 2001 From: Noel Maersk Date: Tue, 25 Feb 2014 06:25:48 +0200 Subject: [PATCH] scrypt: remove commented-out magic numbers. --- scrypt.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/scrypt.c b/scrypt.c index acbd9828..506b7daf 100644 --- a/scrypt.c +++ b/scrypt.c @@ -402,10 +402,6 @@ static void scrypt_n_1_1_256_sp(const uint32_t* input, char* scratchpad, uint32_ PBKDF2_SHA256_80_128_32(input, X, ostate); } -/* 131583 rounded up to 4 byte alignment */ -//#define SCRATCHBUF_SIZE (131584) -//#define SCRATCHBUF_SIZE (262207) - void scrypt_regenhash(struct work *work) { uint32_t data[20]; @@ -415,7 +411,7 @@ void scrypt_regenhash(struct work *work) be32enc_vect(data, (const uint32_t *)work->data, 19); data[19] = htobe32(*nonce); - //scratchbuf = alloca(SCRATCHBUF_SIZE); + scratchbuf = (char *)alloca((1 << opt_nfactor) * 128 + 512); scrypt_n_1_1_256_sp(data, scratchbuf, ohash, (1 << opt_nfactor)); flip32(ohash, ohash);