holado 0.6.4__py3-none-any.whl → 0.6.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of holado might be problematic. Click here for more details.
- {holado-0.6.4.dist-info → holado-0.6.5.dist-info}/METADATA +1 -1
- {holado-0.6.4.dist-info → holado-0.6.5.dist-info}/RECORD +5 -5
- holado_python/standard_library/hashlib.py +28 -0
- {holado-0.6.4.dist-info → holado-0.6.5.dist-info}/WHEEL +0 -0
- {holado-0.6.4.dist-info → holado-0.6.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -348,7 +348,7 @@ holado_python/common/tools/comparators/integer_comparator.py,sha256=UtfxCpQlZ2hm
|
|
|
348
348
|
holado_python/common/tools/comparators/string_comparator.py,sha256=wOtAnp4mYqPoDYkgLOqR1ZhkuaQuViBU0-lmLuXGlCw,5743
|
|
349
349
|
holado_python/common/tools/comparators/type_comparator.py,sha256=EePE-LrqUeICEQP8CCbk6H4vYfAHhgp-4xXnDThZMGw,1615
|
|
350
350
|
holado_python/standard_library/csv.py,sha256=G98oLsgovghpiQf4k06bUlXVvLy_D5H9qTK8e68UdcM,8937
|
|
351
|
-
holado_python/standard_library/hashlib.py,sha256=
|
|
351
|
+
holado_python/standard_library/hashlib.py,sha256=5hMcHxc4BR4G0uNRqezTonflH_AFSLQum37Kqv1rRSU,4179
|
|
352
352
|
holado_python/standard_library/multiprocessing.py,sha256=vThmJzdDTtdFyGUL3i3evmt2JBUK-jrorKbEtQ7TSFU,2786
|
|
353
353
|
holado_python/standard_library/queue.py,sha256=RIFid85_CMFmanpt61LSaYqeHdlFwAuhcpBhxgyWj_o,3059
|
|
354
354
|
holado_python/standard_library/typing.py,sha256=8F9Iolh-c9GbDGlNr3V6uPdTEhSBdkLQu46oVwHPYKk,7693
|
|
@@ -650,7 +650,7 @@ test_holado/tools/django/api_rest/api_rest/api1/serializers.py,sha256=o_YxFr-tgC
|
|
|
650
650
|
test_holado/tools/django/api_rest/api_rest/api1/tests.py,sha256=mrbGGRNg5jwbTJtWWa7zSKdDyeB4vmgZCRc2nk6VY-g,60
|
|
651
651
|
test_holado/tools/django/api_rest/api_rest/api1/views.py,sha256=kOt2xT6bxO47_z__5yYR9kcYIWWv4qYzpX0K8Tqonik,758
|
|
652
652
|
test_holado/tools/django/api_rest/api_rest/api1/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
653
|
-
holado-0.6.
|
|
654
|
-
holado-0.6.
|
|
655
|
-
holado-0.6.
|
|
656
|
-
holado-0.6.
|
|
653
|
+
holado-0.6.5.dist-info/METADATA,sha256=EdMArFb9UkUD8IoDHuHYu8OzbXpO8akW1kh0tSmgExg,7885
|
|
654
|
+
holado-0.6.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
655
|
+
holado-0.6.5.dist-info/licenses/LICENSE,sha256=IgGmNlcFHnbp7UWrLJqAFvs_HIgjJDTmjCNRircJLsk,1070
|
|
656
|
+
holado-0.6.5.dist-info/RECORD,,
|
|
@@ -37,6 +37,34 @@ class HashTools(object):
|
|
|
37
37
|
res = prefix + res
|
|
38
38
|
|
|
39
39
|
return res
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def hash(cls, algorithm_name, content, hash_size=None, **hash_kwargs):
|
|
43
|
+
hash_obj = hashlib.new(algorithm_name, **hash_kwargs)
|
|
44
|
+
cls._update_hash(hash_obj, content)
|
|
45
|
+
res = hash_obj.digest()
|
|
46
|
+
|
|
47
|
+
# Truncate result size if needed
|
|
48
|
+
if hash_size is not None:
|
|
49
|
+
if not isinstance(hash_size, int):
|
|
50
|
+
raise TechnicalException(f"Parameter size must be an integer")
|
|
51
|
+
res = res[:hash_size]
|
|
52
|
+
|
|
53
|
+
return res
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def hexhash(cls, algorithm_name, content, hex_size=None, **hash_kwargs):
|
|
57
|
+
hash_obj = hashlib.new(algorithm_name, **hash_kwargs)
|
|
58
|
+
cls._update_hash(hash_obj, content)
|
|
59
|
+
res = hash_obj.hexdigest()
|
|
60
|
+
|
|
61
|
+
# Truncate result size if needed
|
|
62
|
+
if hex_size is not None:
|
|
63
|
+
if not isinstance(hex_size, int):
|
|
64
|
+
raise TechnicalException(f"Parameter hex_size must be an integer")
|
|
65
|
+
res = res[:hex_size]
|
|
66
|
+
|
|
67
|
+
return res
|
|
40
68
|
|
|
41
69
|
@classmethod
|
|
42
70
|
def hexmd5(cls, content):
|
|
File without changes
|
|
File without changes
|