def reencrypt_user_content(engine,<EOL>user_id,<EOL>old_decrypt_func,<EOL>new_encrypt_func,<EOL>logger):
logger.info("<STR_LIT>", user_id)<EOL>with engine.begin() as db:<EOL><INDENT>logger.info("<STR_LIT>", user_id)<EOL>for (file_id,) in select_file_ids(db, user_id):<EOL><INDENT>reencrypt_row_content(<EOL>db,<EOL>files,<EOL>file_id,<EOL>old_decrypt_func,<EOL>new_encrypt_func,<EOL>logger,<EOL>)<EOL><DEDENT>logger.info("<STR_LIT>", user_id)<EOL>for (cp_id,) in select_remote_checkpoint_ids(db, user_id):<EOL><INDENT>reencrypt_row_content(<EOL>db,<EOL>remote_checkpoints,<EOL>cp_id,<EOL>old_decrypt_func,<EOL>new_encrypt_func,<EOL>logger,<EOL>)<EOL><DEDENT><DEDENT>logger.info("<STR_LIT>", user_id)<EOL>
Re-encrypt all of the files and checkpoints for a single user.