pgcontents/utils/sync.py
def unencrypt_all_users(engine, old_crypto_factory, logger):
    """
    Unencrypt data for all users.

    Parameters
    ----------
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    old_crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of existing database content.
    logger : logging.Logger, optional
        A logger to user during re-encryption.
    """
    logger.info("Beginning re-encryption for all users.")
    for user_id in all_user_ids(engine):
        unencrypt_single_user(
            engine=engine,
            user_id=user_id,
            old_crypto=old_crypto_factory(user_id),
            logger=logger,
        )
    logger.info("Finished re-encryption for all users.")
def unencrypt_all_users(engine, old_crypto_factory, logger):
    logger.info("Beginning re-encryption for all users.")
    for user_id in all_user_ids(engine):
        unencrypt_single_user(
            engine=engine,
            user_id=user_id,
            old_crypto=old_crypto_factory(user_id),
            logger=logger,
        )
    logger.info("Finished re-encryption for all users.")
def unencrypt_all_users ( engine , old_crypto_factory , logger ) : logger . info ( "Beginning re-encryption for all users." ) for user_id in all_user_ids ( engine ) : unencrypt_single_user ( engine = engine , user_id = user_id , old_crypto = old_crypto_factory ( user_id ) , logger = logger , ) logger . info ( "Finished re-encryption for all users." )
Unencrypt data for all users.

    Parameters
    ----------
    engine : SQLAlchemy.engine
        Engine encapsulating database connections.
    old_crypto_factory : function[str -> Any]
        A function from user_id to an object providing the interface required
        by PostgresContentsManager.crypto.  Results of this will be used for
        decryption of existing database content.
    logger : logging.Logger, optional
        A logger to user during re-encryption.
Unencrypt data for all users .