Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rotten-turtles-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fingerprint/python-sdk": patch
---

Bump minimum required `cryptography` version from `41.0.0` to `46.0.5`.
5 changes: 1 addition & 4 deletions fingerprint_server_sdk/sealed.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import zlib

from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes

from fingerprint_server_sdk.models.event import Event
Expand Down Expand Up @@ -92,9 +91,7 @@ def __unseal_aes256gcm(sealed_data: bytes, decryption_key: bytes) -> str:

ciphertext = sealed_data[len(SEALED_HEADER) + nonce_length : -auth_tag_length]

decipher = Cipher(
algorithms.AES(decryption_key), modes.GCM(nonce, auth_tag), backend=default_backend()
).decryptor()
decipher = Cipher(algorithms.AES(decryption_key), modes.GCM(nonce, auth_tag)).decryptor()

compressed = decipher.update(ciphertext) + decipher.finalize()

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dependencies = [
"python-dateutil (>=2.8.2)",
"pydantic (>=2)",
"typing-extensions (>=4.7.1)",
"cryptography"
"cryptography (>=46.0.5)"
]

[project.optional-dependencies]
Expand All @@ -39,7 +39,7 @@ python-dotenv = ">= 1.0.0"


[build-system]
requires = ["setuptools"]
requires = ["setuptools>=82.0.1"]
build-backend = "setuptools.build_meta"

[tool.pylint.'MESSAGES CONTROL']
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ urllib3 >= 2.1.0, < 3.0.0
python_dateutil >= 2.8.2
pydantic >= 2
typing-extensions >= 4.7.1
cryptography >= 41.0.0
setuptools >= 65.5.1
cryptography >= 46.0.5
setuptools >= 82.0.1
6 changes: 3 additions & 3 deletions template/pyproject.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ typing-extensions = ">= 4.7.1"
{{#lazyImports}}
lazy-imports = ">= 1, < 2"
{{/lazyImports}}
cryptography = ">= 41.0.0"
cryptography = ">= 46.0.5"
python-dotenv = ">= 1.0.0"
{{/poetry1}}
{{^poetry1}}
Expand Down Expand Up @@ -86,7 +86,7 @@ dependencies = [
{{#lazyImports}}
"lazy-imports (>=1,<2)"
{{/lazyImports}}
"cryptography"
"cryptography (>=46.0.5)"
]

[project.optional-dependencies]
Expand Down Expand Up @@ -118,7 +118,7 @@ python-dotenv = ">= 1.0.0"


[build-system]
requires = ["setuptools"]
requires = ["setuptools>=82.0.1"]
build-backend = "setuptools.build_meta"

[tool.pylint.'MESSAGES CONTROL']
Expand Down
4 changes: 2 additions & 2 deletions template/requirements.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ typing-extensions >= 4.7.1
{{#lazyImports}}
lazy-imports >= 1, < 2
{{/lazyImports}}
cryptography >= 41.0.0
setuptools >= 65.5.1
cryptography >= 46.0.5
setuptools >= 82.0.1
4 changes: 1 addition & 3 deletions template/sealed.py.mustache
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import json
import zlib

from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes

from {{packageName}}.models.event import Event
Expand Down Expand Up @@ -91,8 +90,7 @@ def __unseal_aes256gcm(sealed_data: bytes, decryption_key: bytes) -> str:

decipher = Cipher(
algorithms.AES(decryption_key),
modes.GCM(nonce, auth_tag),
backend=default_backend()
modes.GCM(nonce, auth_tag)
).decryptor()

compressed = decipher.update(ciphertext) + decipher.finalize()
Expand Down
Loading