Use a better way of generating keys for password encryption