Custom password hashing for migrating data