Not so complicated if you plan for this sort of stuff ahead of time, or even at migration time.  You can prepend your hashed fields with the algorithm used, and have a library that automatically handles them.<p>This also makes generating test data easier, as our library has a &quot;plaintext&quot; hash type, so we can just insert &quot;$plaintext$password&quot; rather than having to run a hash on the password.