pyhubblenetwork 0.8.0__tar.gz → 0.10.0__tar.gz

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.
Files changed (32) hide show
  1. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/PKG-INFO +1 -1
  2. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/pyproject.toml +1 -1
  3. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/ble.py +10 -1
  4. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/cli.py +373 -126
  5. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/cloud.py +7 -1
  6. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/crypto.py +16 -10
  7. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/org.py +26 -10
  8. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/packets.py +11 -0
  9. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_aes_eax.py +202 -0
  10. pyhubblenetwork-0.10.0/tests/test_cli_ctr_autodetect.py +137 -0
  11. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_cloud_integration.py +28 -4
  12. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_org_delete_device.py +98 -1
  13. pyhubblenetwork-0.10.0/tests/test_register_device_cloud.py +91 -0
  14. pyhubblenetwork-0.10.0/tests/test_register_device_validation.py +87 -0
  15. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/.gitignore +0 -0
  16. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/LICENSE +0 -0
  17. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/README.md +0 -0
  18. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/plugins/pyhubblenetwork/skills/hubble-ready-test/README.md +0 -0
  19. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/__init__.py +0 -0
  20. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/device.py +0 -0
  21. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/errors.py +0 -0
  22. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/ready.py +0 -0
  23. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/src/hubblenetwork/sat.py +0 -0
  24. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/__init__.py +0 -0
  25. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/conftest.py +0 -0
  26. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_ble_validate.py +0 -0
  27. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_cli_payload.py +0 -0
  28. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_counter_eid.py +0 -0
  29. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_metrics.py +0 -0
  30. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_sat.py +0 -0
  31. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_sat_integration.py +0 -0
  32. {pyhubblenetwork-0.8.0 → pyhubblenetwork-0.10.0}/tests/test_unencrypted.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyhubblenetwork
3
- Version: 0.8.0
3
+ Version: 0.10.0
4
4
  Summary: Hubble SDK host-side tools
5
5
  Author-email: Paul Buckley <paul@hubble.com>
6
6
  License-Expression: Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pyhubblenetwork"
7
- version = "0.8.0"
7
+ version = "0.10.0"
8
8
  requires-python = ">=3.9"
9
9
  authors = [
10
10
  { name="Paul Buckley", email="paul@hubble.com" },
@@ -75,8 +75,17 @@ def _make_packet(raw: bytes, rssi: int) -> HubblePacket:
75
75
  version = raw[0] >> 2
76
76
 
77
77
  if version == 0:
78
+ # AES-CTR advertisement layout: seq_no (2) | EID (4) | auth_tag (4) | ciphertext.
79
+ eid = int.from_bytes(raw[2:6], "big") if len(raw) >= 6 else None
80
+ auth_tag = bytes(raw[6:10]) if len(raw) >= 10 else None
78
81
  return EncryptedPacket(
79
- timestamp=ts, location=_FAKE_LOCATION, payload=raw, rssi=rssi
82
+ timestamp=ts,
83
+ location=_FAKE_LOCATION,
84
+ payload=raw,
85
+ rssi=rssi,
86
+ protocol_version=version,
87
+ eid=eid,
88
+ auth_tag=auth_tag,
80
89
  )
81
90
  elif version == 1:
82
91
  parsed = parse_unencrypted(raw)