Skip to content
Snippets Groups Projects
Commit f6cedec6 authored by Moul's avatar Moul
Browse files

[enh] #69: PubSec: Specify number of expected chars in the regex

- Imported from Silkaj
parent d8e15f7d
No related branches found
No related tags found
1 merge request!54#71: handle seedhex
Pipeline #4394 passed
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment