Skip to content

Commit

Permalink
Merge pull request #111 from letmaik/letmaik/sign1-signature-setter
Browse files Browse the repository at this point in the history
Add `signature` setter to `Sign1Message`
  • Loading branch information
TimothyClaeys authored Dec 15, 2023
2 parents e527e79 + b37d386 commit 8883ffd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pycose/messages/sign1message.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def __init__(self,
@property
def signature(self):
return self._signature

@signature.setter
def signature(self, value):
if not isinstance(value, bytes):
raise TypeError("Signature must be of type 'bytes'")

self._signature = value

def _create_sig_structure(self, detached_payload: Optional[bytes] = None):
"""
Expand Down

0 comments on commit 8883ffd

Please sign in to comment.