diff --git a/duniterpy/key/signing_key.py b/duniterpy/key/signing_key.py index b2180caa0b6bf2fa69bacee001c4b673213dcbe3..6fba6179306384d54d6c04622e0d5a79142f8354 100644 --- a/duniterpy/key/signing_key.py +++ b/duniterpy/key/signing_key.py @@ -166,8 +166,8 @@ class SigningKey(libnacl.sign.Signer): pubsec_content = fh.read() # line patterns - regex_pubkey = compile("pub: ([1-9A-HJ-NP-Za-km-z]+)", MULTILINE) - regex_signkey = compile("sec: ([1-9A-HJ-NP-Za-km-z]+)", MULTILINE) + regex_pubkey = compile("pub: ([1-9A-HJ-NP-Za-km-z]{43,44})", MULTILINE) + regex_signkey = compile("sec: ([1-9A-HJ-NP-Za-km-z]{88,90})", MULTILINE) # check public key field match = search(regex_pubkey, pubsec_content)