From 3c95c31bc8f53ccc678b826ef6dcda3e0cd68bdd Mon Sep 17 00:00:00 2001 From: Sergi Delgado Segura Date: Fri, 6 Dec 2019 13:20:58 +0100 Subject: [PATCH] Creates tools shared between client and server side Includes check_txid_format that has been renamed. Close #12 #43 --- common/tools.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 common/tools.py diff --git a/common/tools.py b/common/tools.py new file mode 100644 index 0000000..d89bbdf --- /dev/null +++ b/common/tools.py @@ -0,0 +1,5 @@ +import re + + +def check_sha256_hex_format(value): + return isinstance(value, str) and re.search(r"^[0-9A-Fa-f]{64}$", value) is not None