Skip to content

Commit

Permalink
[FIX] Issue when using hexdecimal password for Mnemonic
Browse files Browse the repository at this point in the history
  • Loading branch information
mccwdev committed Nov 29, 2023
1 parent 2a71800 commit 771b9f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bitcoinlib/mnemonic.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def to_seed(self, words, password='', validate=True):
# Check if passphrase is valid
if validate:
self.to_entropy(words)
mnemonic = to_bytes(words)
password = to_bytes(password)
mnemonic = bytes(words, 'utf8')
password = bytes(password, 'utf8')
return hashlib.pbkdf2_hmac(hash_name='sha512', password=mnemonic, salt=b'mnemonic' + password,
iterations=2048)

Expand Down

0 comments on commit 771b9f1

Please sign in to comment.