signedshot 0.1.2__cp312-cp312-win_amd64.whl → 0.1.3__cp312-cp312-win_amd64.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.
signedshot/__init__.py CHANGED
@@ -3,7 +3,8 @@ from signedshot.signedshot import (
3
3
  ValidationResult,
4
4
  validate,
5
5
  validate_files,
6
+ validate_with_jwks,
6
7
  )
7
8
 
8
- __all__ = ["ValidationResult", "validate", "validate_files"]
9
- __version__ = "0.1.0"
9
+ __all__ = ["ValidationResult", "validate", "validate_files", "validate_with_jwks"]
10
+ __version__ = "0.1.3"
signedshot/__init__.pyi CHANGED
@@ -82,6 +82,33 @@ def validate(sidecar_json: str, media_bytes: bytes) -> ValidationResult:
82
82
  """
83
83
  ...
84
84
 
85
+ def validate_with_jwks(
86
+ sidecar_json: str, media_bytes: bytes, jwks_json: str
87
+ ) -> ValidationResult:
88
+ """Validate a SignedShot sidecar against media content using pre-loaded JWKS.
89
+
90
+ Use this when you already have the JWKS available locally, avoiding HTTP fetch.
91
+ This is useful for API services that want to validate using their own keys.
92
+
93
+ Args:
94
+ sidecar_json: The sidecar JSON as a string
95
+ media_bytes: The media file content as bytes
96
+ jwks_json: The JWKS JSON as a string (from /.well-known/jwks.json)
97
+
98
+ Returns:
99
+ ValidationResult with detailed information about the validation
100
+
101
+ Raises:
102
+ ValueError: If the sidecar or JWKS cannot be parsed
103
+
104
+ Example:
105
+ >>> jwks_json = '{"keys": [...]}'
106
+ >>> result = validate_with_jwks(sidecar_json, media_bytes, jwks_json)
107
+ >>> if result.valid:
108
+ ... print(f"Publisher: {result.capture_trust['publisher_id']}")
109
+ """
110
+ ...
111
+
85
112
  def validate_files(sidecar_path: str, media_path: str) -> ValidationResult:
86
113
  """Validate a SignedShot sidecar from file paths.
87
114
 
Binary file
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: signedshot
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: License :: OSI Approved :: MIT License
@@ -0,0 +1,6 @@
1
+ signedshot\__init__.py,sha256=ww6iw6i1gj2f3bQRml7ic45xkfgo-DHCnWCXbiDU0II,269
2
+ signedshot\__init__.pyi,sha256=X4_tPFq7p75rvVXGvlWE7rah2TzX3fdMWPZuGJy9_kY,3988
3
+ signedshot\signedshot.cp312-win_amd64.pyd,sha256=uIw-tZ5F9JZQwuxF5bk0AqF0FoHHiBSy6u3oq_O1U7I,4026368
4
+ signedshot-0.1.3.dist-info\METADATA,sha256=P_pyncY_77JDZ5wwZm7aRFSuh2WvO02LoKOLu6E8eyA,1644
5
+ signedshot-0.1.3.dist-info\WHEEL,sha256=xGRyMfC2nQGcuDMHm_QfSkv2HVaAAAo1DvjuUmalQqw,97
6
+ signedshot-0.1.3.dist-info\RECORD,,
@@ -1,6 +0,0 @@
1
- signedshot\__init__.py,sha256=EQtQu8mm3AMd__njJXdbXqG2F3Gb8Tu8-zxlH1d152k,222
2
- signedshot\__init__.pyi,sha256=J2d9EG8wXlC9-iZSRYZT_0tJA-he3vvIXgVlp5bROTM,3004
3
- signedshot\signedshot.cp312-win_amd64.pyd,sha256=Bt0Ogl9e4Vl83zjULNOzvmAXjz3x5OCkBH-psKaVDCo,4026880
4
- signedshot-0.1.2.dist-info\METADATA,sha256=HetXF6Z6eT5vkDd00vdX2t6z--vEHDGhvJc87YRf-Ls,1644
5
- signedshot-0.1.2.dist-info\WHEEL,sha256=xGRyMfC2nQGcuDMHm_QfSkv2HVaAAAo1DvjuUmalQqw,97
6
- signedshot-0.1.2.dist-info\RECORD,,