pgcontents/utils/sync.py
def reencrypt_single_user(engine, user_id, old_crypto, new_crypto, logger):
    """
    Re-encrypt all files and checkpoints for a single user.
    """
    # Use FallbackCrypto so that we're re-entrant if we halt partway through.
    crypto = FallbackCrypto([new_crypto, old_crypto])

    reencrypt_user_content(
        engine=engine,
        user_id=user_id,
        old_decrypt_func=crypto.decrypt,
        new_encrypt_func=crypto.encrypt,
        logger=logger,
    )
def reencrypt_single_user(engine, user_id, old_crypto, new_crypto, logger):
    """
    Re-encrypt all files and checkpoints for a single user.
    """
    # Use FallbackCrypto so that we're re-entrant if we halt partway through.
    crypto = FallbackCrypto([new_crypto, old_crypto])

    reencrypt_user_content(
        engine=engine,
        user_id=user_id,
        old_decrypt_func=crypto.decrypt,
        new_encrypt_func=crypto.encrypt,
        logger=logger,
    )
def reencrypt_single_user ( engine , user_id , old_crypto , new_crypto , logger ) : # Use FallbackCrypto so that we're re-entrant if we halt partway through. crypto = FallbackCrypto ( [ new_crypto , old_crypto ] ) reencrypt_user_content ( engine = engine , user_id = user_id , old_decrypt_func = crypto . decrypt , new_encrypt_func = crypto . encrypt , logger = logger , )
Re-encrypt all files and checkpoints for a single user.
Re - encrypt all files and checkpoints for a single user .