def encrypt(self, ballot: PlaintextBallot) -> Optional[CiphertextBallot]:
    '\n        Encrypt the specified ballot using the cached election context.\n        '
    log_info(f' encrypt: objectId: {ballot.object_id}')
    encrypted_ballot = encrypt_ballot(ballot, self._internal_manifest, self._context, self._encryption_seed)
    if ((encrypted_ballot is not None) and (encrypted_ballot.code is not None)):
        self._encryption_seed = encrypted_ballot.code
    return encrypted_ballot
Encrypt the specified ballot using the cached election context.
def encrypt(self, ballot: PlaintextBallot) -> Optional[CiphertextBallot]:
    '\n        \n        '
    log_info(f' encrypt: objectId: {ballot.object_id}')
    encrypted_ballot = encrypt_ballot(ballot, self._internal_manifest, self._context, self._encryption_seed)
    if ((encrypted_ballot is not None) and (encrypted_ballot.code is not None)):
        self._encryption_seed = encrypted_ballot.code
    return encrypted_ballot