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: CadrumoError

Base error for review-package recipient-encryption failures.

Parameters:
  • message (str | None)

  • context (Mapping[str, object] | None)

  • translated_message (str | None)

Return type:

None

code
exception RecipientDecryptionError(message=None, *, context=None, translated_message=None)[source]

Bases: RecipientEncryptionError

Raised when a recipient-encrypted package cannot be opened.

Parameters:
  • message (str | None)

  • context (Mapping[str, object] | None)

  • translated_message (str | None)

Return type:

None

code
exception RecipientPackageExpiredError(message=None, *, context=None, translated_message=None)[source]

Bases: RecipientDecryptionError

Raised when an envelope is presented at or after its validity deadline.

Parameters:
  • message (str | None)

  • context (Mapping[str, object] | None)

  • translated_message (str | None)

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:

RecipientEncryptionKeypair

Parameters:
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:

RecipientEncryptedPackage

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:

RecipientDecryptedPackage

Parameters: