-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
533 additions
and
429 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy-3.9"] | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.10"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -21,12 +21,12 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install/update package management dependencies | ||
run: python -m pip install --upgrade pip setuptools wheel | ||
- name: Update pip | ||
run: python -m pip install --upgrade pip | ||
- name: Build and install python-doubleratchet | ||
run: pip install . | ||
- name: Install test dependencies | ||
run: pip install --upgrade pytest pytest-asyncio pytest-cov mypy pylint flake8 | ||
run: pip install --upgrade pytest pytest-asyncio pytest-cov mypy pylint flake8 setuptools | ||
|
||
- name: Type-check using mypy | ||
run: mypy --strict doubleratchet/ setup.py examples/ tests/ | ||
|
@@ -57,6 +57,8 @@ jobs: | |
publish: | ||
needs: [test, build] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
|
@@ -65,7 +67,5 @@ jobs: | |
path: dist | ||
merge-multiple: true | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.pypi_token }} | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,34 @@ | ||
from .version import __version__ | ||
from .project import project | ||
|
||
from .aead import AEAD, AuthenticationFailedException, DecryptionFailedException | ||
from .diffie_hellman_ratchet import DiffieHellmanRatchet, DoSProtectionException, DuplicateMessageException | ||
from .double_ratchet import DoubleRatchet | ||
from .kdf import KDF | ||
from .kdf_chain import KDFChain | ||
from .migrations import InconsistentSerializationException | ||
from .models import DiffieHellmanRatchetModel, DoubleRatchetModel, KDFChainModel, SymmetricKeyRatchetModel | ||
from .symmetric_key_ratchet import Chain, ChainNotAvailableException, SymmetricKeyRatchet | ||
from .types import EncryptedMessage, Header, JSONObject, SkippedMessageKeys | ||
|
||
|
||
# Fun: | ||
# https://github.com/PyCQA/pylint/issues/6006 | ||
# https://github.com/python/mypy/issues/10198 | ||
__all__ = [ # pylint: disable=unused-variable | ||
# .version | ||
"__version__", | ||
|
||
# .project | ||
"project", | ||
|
||
# .aead | ||
"AEAD", | ||
"AuthenticationFailedException", | ||
"DecryptionFailedException", | ||
|
||
# .diffie_hellman_ratchet | ||
"DiffieHellmanRatchet", | ||
"DoSProtectionException", | ||
"DuplicateMessageException", | ||
|
||
# .double_ratchet | ||
"DoubleRatchet", | ||
|
||
# .kdf | ||
"KDF", | ||
|
||
# .kdf_chain | ||
"KDFChain", | ||
|
||
# .migrations | ||
"InconsistentSerializationException", | ||
|
||
# .models | ||
"DiffieHellmanRatchetModel", | ||
"DoubleRatchetModel", | ||
"KDFChainModel", | ||
"SymmetricKeyRatchetModel", | ||
|
||
# .symmetric_key_ratchet | ||
"Chain", | ||
"ChainNotAvailableException", | ||
"SymmetricKeyRatchet", | ||
|
||
# .types | ||
"EncryptedMessage", | ||
"Header", | ||
"JSONObject", | ||
"SkippedMessageKeys" | ||
] | ||
from .version import __version__ as __version__ | ||
from .project import project as project | ||
|
||
from .aead import ( | ||
AEAD as AEAD, | ||
AuthenticationFailedException as AuthenticationFailedException, | ||
DecryptionFailedException as DecryptionFailedException | ||
) | ||
from .diffie_hellman_ratchet import ( | ||
DiffieHellmanRatchet as DiffieHellmanRatchet, | ||
DoSProtectionException as DoSProtectionException, | ||
DuplicateMessageException as DuplicateMessageException | ||
) | ||
from .double_ratchet import DoubleRatchet as DoubleRatchet | ||
from .kdf import KDF as KDF | ||
from .kdf_chain import KDFChain as KDFChain | ||
from .migrations import InconsistentSerializationException as InconsistentSerializationException | ||
from .models import ( | ||
DiffieHellmanRatchetModel as DiffieHellmanRatchetModel, | ||
DoubleRatchetModel as DoubleRatchetModel, | ||
KDFChainModel as KDFChainModel, | ||
SymmetricKeyRatchetModel as SymmetricKeyRatchetModel | ||
) | ||
from .symmetric_key_ratchet import ( | ||
Chain as Chain, | ||
ChainNotAvailableException as ChainNotAvailableException, | ||
SymmetricKeyRatchet as SymmetricKeyRatchet | ||
) | ||
from .types import ( | ||
EncryptedMessage as EncryptedMessage, | ||
Header as Header, | ||
JSONObject as JSONObject, | ||
SkippedMessageKeys as SkippedMessageKeys | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
from abc import ABC, abstractmethod | ||
|
||
|
||
__all__ = [ # pylint: disable=unused-variable | ||
__all__ = [ | ||
"KDF" | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1 @@ | ||
from .crypto_provider import HashFunction | ||
|
||
|
||
# Fun: | ||
# https://github.com/PyCQA/pylint/issues/6006 | ||
# https://github.com/python/mypy/issues/10198 | ||
__all__ = [ # pylint: disable=unused-variable | ||
# .crypto_provider | ||
"HashFunction" | ||
] | ||
from .crypto_provider import HashFunction as HashFunction |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
from .. import aead | ||
|
||
|
||
__all__ = [ # pylint: disable=unused-variable | ||
__all__ = [ | ||
"AEAD" | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
from .crypto_provider_cryptography import CryptoProviderImpl | ||
|
||
|
||
__all__ = [ # pylint: disable=unused-variable | ||
__all__ = [ | ||
"CryptoProviderImpl" | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
from .. import kdf | ||
|
||
|
||
__all__ = [ # pylint: disable=unused-variable | ||
__all__ = [ | ||
"KDF" | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ | |
from .. import kdf | ||
|
||
|
||
__all__ = [ # pylint: disable=unused-variable | ||
__all__ = [ | ||
"KDF" | ||
] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.