Create common package

Moves cryptographer to common. Also adds constants and defines the leghtn of the locator to avoid hardcoding it in almost every file
This commit is contained in:
Sergi Delgado Segura
2019-12-05 11:02:17 +01:00
parent f0150ce585
commit babb746dbd
6 changed files with 13 additions and 8 deletions

8
common/constants.py Normal file
View File

@@ -0,0 +1,8 @@
# Locator
LOCATOR_LEN_HEX = 32
LOCATOR_LEN_BYTES = LOCATOR_LEN_HEX // 2
# HTTP
HTTP_OK = 200
HTTP_BAD_REQUEST = 400
HTTP_SERVICE_UNAVAILABLE = 503