Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeneralDedCiphering #91

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions dlms_cosem/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class XDlmsApduFactory:
40: xdlms.GlobalCipherInitiateResponse,
216: xdlms.ExceptionResponse,
219: xdlms.GeneralGlobalCipher,
220: xdlms.GeneralDedCipher,
# ACSE APDUs:
96: acse.ApplicationAssociationRequest,
97: acse.ApplicationAssociationResponse,
Expand Down
1 change: 1 addition & 0 deletions dlms_cosem/protocol/xdlms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from dlms_cosem.protocol.xdlms.data_notification import DataNotification
from dlms_cosem.protocol.xdlms.exception_response import ExceptionResponse
from dlms_cosem.protocol.xdlms.general_global_cipher import GeneralGlobalCipher
from dlms_cosem.protocol.xdlms.general_ded_cipher import GeneralDedCipher
from dlms_cosem.protocol.xdlms.get import (
GetRequestFactory,
GetRequestNext,
Expand Down
12 changes: 12 additions & 0 deletions dlms_cosem/protocol/xdlms/general_ded_cipher.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from dlms_cosem.protocol.xdlms.base import AbstractXDlmsApdu
from dlms_cosem.protocol.xdlms.general_global_cipher import GeneralGlobalCipher

# TODO: move implementation from GeneralGlobalCipher to KeySpecificCiphering
KeySpecificCipher = type(
"KeySpecificCipher", (AbstractXDlmsApdu,), dict(GeneralGlobalCipher.__dict__)
)


class GeneralDedCipher(KeySpecificCipher):
TAG = 220
NAME = "general-ded-cipher"