naeural-client 2.1.5__py3-none-any.whl → 2.2.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.
naeural_client/_ver.py CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "2.1.5"
1
+ __VER__ = "2.2.1"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
naeural_client/bc/ec.py CHANGED
@@ -271,8 +271,8 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
271
271
  self,
272
272
  plaintext: str,
273
273
  receiver_address: str,
274
- compressed: bool = False,
275
- embed_compressed: bool = False,
274
+ compressed: bool = True,
275
+ embed_compressed: bool = True,
276
276
  info: str = BCct.DEFAULT_INFO,
277
277
  debug: bool = False
278
278
  ):
@@ -289,7 +289,10 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
289
289
  The plaintext to encrypt.
290
290
 
291
291
  compressed : bool, optional
292
- Whether to compress the plaintext before encryption. The default is False.
292
+ Whether to compress the plaintext before encryption. The default is True.
293
+
294
+ embed_compressed : bool, optional
295
+ Whether to embed the compressed flag in the encrypted data. The default is True.
293
296
 
294
297
  Returns
295
298
  -------
@@ -319,13 +322,18 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
319
322
  self,
320
323
  encrypted_data_b64 : str,
321
324
  sender_address : str,
322
- decompress: bool = False,
323
- embed_compressed: bool = False,
325
+ decompress: bool = False, # decompress is only used if embed_compressed is False
326
+ embed_compressed: bool = True,
324
327
  info: str = BCct.DEFAULT_INFO,
325
328
  debug: bool = False
326
329
  ):
327
330
  """
328
331
  Decrypts base64 encoded encrypted data using the receiver's private key.
332
+
333
+ The structure of the encrypted data is:
334
+ - 12 bytes nonce
335
+ - 1 byte compressed flag
336
+ - 13:... The ciphertext
329
337
 
330
338
  Parameters
331
339
  ----------
@@ -335,6 +343,13 @@ class BaseBCEllipticCurveEngine(BaseBlockEngine):
335
343
  sender_address : str
336
344
  The sender's address.
337
345
 
346
+ decompress : bool, optional
347
+ Whether to decompress the plaintext after decryption. The default is False as the decompression flag is embedded in the encrypted data.
348
+
349
+ embed_compressed : bool, optional
350
+ Whether the compressed flag is embedded in the encrypted data. The default is True.
351
+
352
+
338
353
  Returns
339
354
  -------
340
355
  str
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: naeural_client
3
- Version: 2.1.5
3
+ Version: 2.2.1
4
4
  Summary: `naeural_client` is the Python SDK required for client app development for the Naeural Edge Protocol Edge Protocol framework
5
5
  Project-URL: Homepage, https://github.com/Naeural Edge ProtocolEdgeProtocol/naeural_client
6
6
  Project-URL: Bug Tracker, https://github.com/Naeural Edge ProtocolEdgeProtocol/naeural_client/issues
@@ -1,5 +1,5 @@
1
1
  naeural_client/__init__.py,sha256=UKEDGS0wFYyxwmhEAKJGecO2vYbIfRYUP4SQgnK10IE,578
2
- naeural_client/_ver.py,sha256=R9gbAUavcjm9bXT99OTFSFCAgA9DEIx8kdVCFe6mu7c,330
2
+ naeural_client/_ver.py,sha256=Uvmgeu264AN0yopEhDq75F2YIR2-oX5FrZrNpQN9x6Q,330
3
3
  naeural_client/base_decentra_object.py,sha256=qDBpitcyhr1eEXPD8cGFtcNPNf71fqNRsmOEcCpx4sM,4180
4
4
  naeural_client/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
5
5
  naeural_client/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
@@ -15,7 +15,7 @@ naeural_client/base/payload/payload.py,sha256=v50D7mBBD2WwWzvpbRGMSr-X6vv5ie21IY
15
15
  naeural_client/bc/__init__.py,sha256=FQj23D1PrY06NUOARiKQi4cdj0-VxnoYgYDEht8lpr8,158
16
16
  naeural_client/bc/base.py,sha256=nAFL4z9kyFcmrilHWCia69xMWi65VzjoQ_mo-yCQhGA,28331
17
17
  naeural_client/bc/chain.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- naeural_client/bc/ec.py,sha256=Xyl_POZ2VSnVHHqNtZKhi7NSVwofDX9-fPQxOrY9erA,9688
18
+ naeural_client/bc/ec.py,sha256=rtIayhYle70HKznRkTdZf2aGzhzHSXGu_qA8IthZY6s,10336
19
19
  naeural_client/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  naeural_client/certs/r9092118.ala.eu-central-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde1z1gPULtJNSYUpG_YFkYaMKU,1337
21
21
  naeural_client/code_cheker/__init__.py,sha256=pwkdeZGVL16ZA4Qf2mRahEhoOvKhL7FyuQbMFLr1E5M,33
@@ -75,7 +75,7 @@ naeural_client/logging/tzlocal/windows_tz.py,sha256=Sv9okktjZJfRGGUOOppsvQuX_eXy
75
75
  naeural_client/utils/__init__.py,sha256=mAnke3-MeRzz3nhQvhuHqLnpaaCSmDxicd7Ck9uwpmI,77
76
76
  naeural_client/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,1072
77
77
  naeural_client/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
78
- naeural_client-2.1.5.dist-info/METADATA,sha256=4B88yFIzVtP9gFyR7dK3Vzj3co-3TU6aEWaG-J2yJJc,14457
79
- naeural_client-2.1.5.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
80
- naeural_client-2.1.5.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
81
- naeural_client-2.1.5.dist-info/RECORD,,
78
+ naeural_client-2.2.1.dist-info/METADATA,sha256=M74RRLcp_vKpKDJ8etHzvgOgR8LYMG2oheC8ynNMMg0,14457
79
+ naeural_client-2.2.1.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
80
+ naeural_client-2.2.1.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
81
+ naeural_client-2.2.1.dist-info/RECORD,,