Python funtion to hash passwords for igntion user database