Disclosed is a system, method, and computer program product that generates masked data from within a database infrastructure. Instead of requiring an external tool to generate masked data, a database generates masked data using its internal processing mechanisms.