transcrypto 1.4.0__py3-none-any.whl → 1.5.1__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.
- transcrypto/base.py +13 -4
- {transcrypto-1.4.0.dist-info → transcrypto-1.5.1.dist-info}/METADATA +2 -2
- {transcrypto-1.4.0.dist-info → transcrypto-1.5.1.dist-info}/RECORD +6 -6
- {transcrypto-1.4.0.dist-info → transcrypto-1.5.1.dist-info}/WHEEL +0 -0
- {transcrypto-1.4.0.dist-info → transcrypto-1.5.1.dist-info}/licenses/LICENSE +0 -0
- {transcrypto-1.4.0.dist-info → transcrypto-1.5.1.dist-info}/top_level.txt +0 -0
transcrypto/base.py
CHANGED
|
@@ -11,7 +11,7 @@ import argparse
|
|
|
11
11
|
import base64
|
|
12
12
|
import codecs
|
|
13
13
|
import dataclasses
|
|
14
|
-
|
|
14
|
+
import datetime
|
|
15
15
|
import enum
|
|
16
16
|
import functools
|
|
17
17
|
import hashlib
|
|
@@ -32,11 +32,10 @@ from scipy import stats # type:ignore
|
|
|
32
32
|
import zstandard
|
|
33
33
|
|
|
34
34
|
__author__ = 'balparda@github.com'
|
|
35
|
-
__version__ = '1.
|
|
35
|
+
__version__ = '1.5.1' # 2026-01-13, Tue
|
|
36
36
|
__version_tuple__: tuple[int, ...] = tuple(int(v) for v in __version__.split('.'))
|
|
37
37
|
|
|
38
|
-
#
|
|
39
|
-
# datetime.datetime(2000, 1, 1, 0, 0, 0).replace(tzinfo=datetime.timezone.utc).timestamp())
|
|
38
|
+
# Data conversion utils
|
|
40
39
|
|
|
41
40
|
BytesToHex: Callable[[bytes], str] = lambda b: b.hex()
|
|
42
41
|
BytesToInt: Callable[[bytes], int] = lambda b: int.from_bytes(b, 'big', signed=False)
|
|
@@ -50,6 +49,16 @@ EncodedToBytes: Callable[[str], bytes] = lambda e: base64.urlsafe_b64decode(e.en
|
|
|
50
49
|
|
|
51
50
|
PadBytesTo: Callable[[bytes, int], bytes] = lambda b, i: b.rjust((i + 7) // 8, b'\x00')
|
|
52
51
|
|
|
52
|
+
# Time utils
|
|
53
|
+
|
|
54
|
+
MIN_TM = int(
|
|
55
|
+
datetime.datetime(2000, 1, 1, 0, 0, 0).replace(tzinfo=datetime.timezone.utc).timestamp())
|
|
56
|
+
TIME_FORMAT = '%Y/%b/%d-%H:%M:%S-UTC'
|
|
57
|
+
TimeStr: Callable[[int | float | None], str] = lambda tm: (
|
|
58
|
+
time.strftime(TIME_FORMAT, time.gmtime(tm)) if tm else '-')
|
|
59
|
+
Now: Callable[[], int] = lambda: int(time.time())
|
|
60
|
+
StrNow: Callable[[], str] = lambda: TimeStr(Now())
|
|
61
|
+
|
|
53
62
|
# SI prefix table, powers of 1000
|
|
54
63
|
_SI_PREFIXES: dict[int, str] = {
|
|
55
64
|
-6: 'a', # atto
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: transcrypto
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.5.1
|
|
4
4
|
Summary: Basic crypto primitives, not intended for actual use, but as a companion to --Criptografia, Métodos e Algoritmos--
|
|
5
5
|
Author-email: Daniel Balparda <balparda@github.com>
|
|
6
6
|
License-Expression: Apache-2.0
|
|
@@ -984,7 +984,7 @@ deactivate
|
|
|
984
984
|
|
|
985
985
|
### Updating Dependencies
|
|
986
986
|
|
|
987
|
-
To update `poetry.lock` file to more current versions do `poetry update`, it will ignore the current lock, update, and rewrite the `poetry.lock` file.
|
|
987
|
+
To update `poetry.lock` file to more current versions do `poetry update`, it will ignore the current lock, update, and rewrite the `poetry.lock` file. If you have cache problems `poetry cache clear PyPI --all` will clean it.
|
|
988
988
|
|
|
989
989
|
To add a new dependency you should do:
|
|
990
990
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
transcrypto/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
transcrypto/aes.py,sha256=TRiON5hvtJoZFz1BaTlWtHOOnq_xK8iW13ajLsBPJ2M,11935
|
|
3
|
-
transcrypto/base.py,sha256=
|
|
3
|
+
transcrypto/base.py,sha256=Mrf3GrRKLtg_Lydmms3Gf8IPk3olaQRV7e3c8mGizXA,60603
|
|
4
4
|
transcrypto/constants.py,sha256=rt7g7H3ga3r_U59YhewwtuFDzVLkB-Uzc9fEq91epX4,158419
|
|
5
5
|
transcrypto/dsa.py,sha256=dc6__0YS2B_xbN4UnhX120GMyWid6qg6iopEimTnoxs,20505
|
|
6
6
|
transcrypto/elgamal.py,sha256=uR0bJ7A13UrAZynW6QRWJZhe86ZvoozaO5U9rDpam_I,21350
|
|
@@ -11,8 +11,8 @@ transcrypto/rsa.py,sha256=3SYUEGOdHn_8UbezzocyQA8bkytL7d_d9rudsv4Zx9A,24926
|
|
|
11
11
|
transcrypto/safetrans.py,sha256=ftrkAPiuha4K73fyzN_aF3kbXOft8KLr6QdOAOVwlnA,57161
|
|
12
12
|
transcrypto/sss.py,sha256=Jl7pa1fleNQ-1kvneaeO-B2PfM0ilNKTYw4vVJ5WGwc,17100
|
|
13
13
|
transcrypto/transcrypto.py,sha256=NGkQS9L_umnsy3MsiQvAbC6eM0vjRV4OF7daxM3mx9M,71386
|
|
14
|
-
transcrypto-1.
|
|
15
|
-
transcrypto-1.
|
|
16
|
-
transcrypto-1.
|
|
17
|
-
transcrypto-1.
|
|
18
|
-
transcrypto-1.
|
|
14
|
+
transcrypto-1.5.1.dist-info/licenses/LICENSE,sha256=DVQuDIgE45qn836wDaWnYhSdxoLXgpRRKH4RuTjpRZQ,10174
|
|
15
|
+
transcrypto-1.5.1.dist-info/METADATA,sha256=Cji_I_xoZepcZAUwX1BdrJ0QWhVzmTpZH3de-pU-hRw,37969
|
|
16
|
+
transcrypto-1.5.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
17
|
+
transcrypto-1.5.1.dist-info/top_level.txt,sha256=9IfB0nGtVzQbYok5QIYNOy3coDv2UKX2OZtlFyxFDDQ,12
|
|
18
|
+
transcrypto-1.5.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|