Copies the algorithm and salt from previous password when saving a new one.