Add BIP85 test vectors and fix implementation

This commit is contained in:
thePR0M3TH3AN
2025-07-01 14:01:41 -04:00
parent 3e5243f5cd
commit f6767ec9a3
3 changed files with 63 additions and 39 deletions

View File

@@ -656,11 +656,8 @@ class PasswordManager:
try:
master_seed = os.urandom(32) # Generate a random 32-byte seed
bip85 = BIP85(master_seed)
mnemonic_obj = bip85.derive_mnemonic(index=0, words_num=12)
mnemonic_str = (
mnemonic_obj.ToStr()
) # Convert Bip39Mnemonic object to string
return mnemonic_str
mnemonic = bip85.derive_mnemonic(index=0, words_num=12)
return mnemonic
except Exception as e:
logging.error(f"Failed to generate BIP-85 seed: {e}")
logging.error(traceback.format_exc())