One of my client recently needed to implement an application-level encryption for some existing application.
Unfortunately, the design pattern used for the database layer obliged me to write an independent script to browse the database and encrypt the data for each user using a user-specific two-way encryption key.
So, I ended up writing a simple utility class that applies a user-defined function (modifies) to the defined columns and records (via a filter query) of each database table.
It can be used for any relational database server supported by PDO (MySQL, SQL Server, MySQL, Oracle). I’ve only used it with MySQL but it should smoothly work with all the others.
An example of usage is in the README, hope it’s clear enough.
You can use this to mass editing Db records with a function that is easily implementable with a simple MySQL Query.