From 771b9f1329e1bce332c119fc4614463887ad0d5a Mon Sep 17 00:00:00 2001 From: Lennart Date: Wed, 29 Nov 2023 17:58:37 +0100 Subject: [PATCH] [FIX] Issue when using hexdecimal password for Mnemonic --- bitcoinlib/mnemonic.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bitcoinlib/mnemonic.py b/bitcoinlib/mnemonic.py index 52612dad..54adbbf1 100644 --- a/bitcoinlib/mnemonic.py +++ b/bitcoinlib/mnemonic.py @@ -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)