mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2025-09-08 07:18:47 +00:00
Fix BIP-85 checksum validation test
This commit is contained in:
@@ -12,10 +12,12 @@ def test_validate_bip85_seed_invalid_word():
|
||||
|
||||
def test_validate_bip85_seed_checksum_failure():
|
||||
pm = PasswordManager.__new__(PasswordManager)
|
||||
m = Mnemonic("english")
|
||||
phrase = m.generate(strength=128)
|
||||
# Use a known valid phrase to avoid randomness causing a valid checksum
|
||||
phrase = (
|
||||
"legal winner thank year wave sausage worth useful legal winner thank yellow"
|
||||
)
|
||||
words = phrase.split()
|
||||
words[-1] = "abandon" if words[-1] != "abandon" else "about"
|
||||
words[-1] = "abandon"
|
||||
bad_phrase = " ".join(words)
|
||||
assert not pm.validate_bip85_seed(bad_phrase)
|
||||
|
||||
|
Reference in New Issue
Block a user