modified: mmgen/config.py
modified: mmgen/utils.py
This commit is contained in:
parent
80f14bb120
commit
c5c4a9e2c2
2 changed files with 8 additions and 7 deletions
|
|
@ -40,9 +40,10 @@ hash_preset = '3'
|
|||
hash_presets = {
|
||||
# Scrypt params:
|
||||
# ID N p r
|
||||
'1': [2**12, 8, 1],
|
||||
'2': [2**13, 8, 4],
|
||||
'3': [2**14, 8, 8],
|
||||
'4': [2**15, 8, 12],
|
||||
'5': [2**16, 8, 16],
|
||||
# N is a power of two
|
||||
'1': [12, 8, 1],
|
||||
'2': [13, 8, 4],
|
||||
'3': [14, 8, 8],
|
||||
'4': [15, 8, 12],
|
||||
'5': [16, 8, 16],
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ def show_hash_presets():
|
|||
msg(fs.format("Preset","N","r","p"))
|
||||
for i in sorted(hash_presets.keys()):
|
||||
msg(fs.format("'%s'" % i, *hash_presets[i]))
|
||||
msg("N = memory usage, p = iterations (rounds)")
|
||||
msg("N = memory usage (power of two), p = iterations (rounds)")
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
|
|
@ -302,7 +302,7 @@ def _scrypt_hash_passphrase(passwd, salt, hash_preset, buflen=32):
|
|||
N,r,p = _get_hash_params(hash_preset)
|
||||
|
||||
import scrypt
|
||||
return scrypt.hash(passwd, salt, N, r, p, buflen=buflen)
|
||||
return scrypt.hash(passwd, salt, 2**N, r, p, buflen=buflen)
|
||||
|
||||
|
||||
def _get_seed_from_brain_passphrase(words,opts):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue