Skip to content

Commit ca868af

Browse files
authored
Update utils.py
1 parent 85d1b03 commit ca868af

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cryptofuzz/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ def double_sha256(self, data):
100100

101101
# --- Mnemonic ---
102102
def mne_to_seed(self, mnemonic, password=""):
103-
salt = ("mnemonic" + password).encode('utf-8')
104-
seed = hashlib.pbkdf2_hmac('sha512', mnemonic.encode('utf-8'), salt, 2048)
105-
return seed[:32]
103+
"""Convert Mnemonic String to Bytes (seed)"""
104+
mne = Mnemonic('english')
105+
return mne.to_seed(mnemonic, password)[:32]
106106

107107
# --- Mnemonic To Bytes
108108
def mne_to_bytes(self, mnemonic):

0 commit comments

Comments
 (0)