However all my salt values get changed mid way during the whole operation and are stored (in the database) differently than what they should be. I checked the code and saw that the script expects the salt values to be base64 encoded. I tried encoding the salt to base64, but the same issue persists.
Lastly I tried to update the salt in the database (postgres) directly using an UPDATE statement, which worked well. Another observation I made is that salt is a 'bytea' data type in postgres and is stored as a hex value.
Is there some issue with the import script? I'll be happy to fix it if anyone points me in the right direction.