cadrumo.application.modelo.review_package_recipient_encryption module¶
Application use-case boundary for recipient-encrypted review packages.
The recipient-encryption capability is defined in
cadrumo.application.modelo.recipient_encryption. This module keeps the
application-level errors and the use-case-shaped wrappers; the concrete
persistence and cryptographic implementation is supplied by an outer adapter.
- exception RecipientEncryptionError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
CadrumoErrorBase error for review-package recipient-encryption failures.
- Parameters:
- Return type:
None
- code¶
- exception RecipientDecryptionError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
RecipientEncryptionErrorRaised when a recipient-encrypted package cannot be opened.
- Parameters:
- Return type:
None
- code¶
- exception RecipientPackageExpiredError(message=None, *, context=None, translated_message=None)[source]¶
Bases:
RecipientDecryptionErrorRaised when an envelope is presented at or after its validity deadline.
- Parameters:
- Return type:
None
- code¶
- ensure_recipient_encryption_keypair(*, bucket_id, recipient_encryption, generated_at=None)[source]¶
Return the bucket’s recipient-encryption keypair through its capability.
- Return type:
- Parameters:
bucket_id (str)
recipient_encryption (RecipientEncryptionCapability)
generated_at (datetime | None)
- encrypt_review_package_for_recipient(package_bytes, *, recipient_public_key_hex, recipient_encryption, review_only=False, valid_for=None, issued_at=None)[source]¶
Seal package bytes through the composed recipient-encryption capability.
- Return type:
- Parameters:
- decrypt_review_package_for_recipient(envelope, *, recipient_private_key_hex, recipient_encryption, now=None)[source]¶
Open an envelope through the composed recipient-encryption capability.
- Return type:
- Parameters:
envelope (RecipientEncryptedPackage)
recipient_private_key_hex (str)
recipient_encryption (RecipientEncryptionCapability)
now (datetime | None)