String saltString = null;
if (salt != null) {
saltString = Hex.encodeHexString(salt.toString().getBytes());
}
CustomerForgotPasswordSecurityToken fpst = new CustomerForgotPasswordSecurityTokenImpl();
fpst.setCustomerId(customer.getId());
fpst.setToken(passwordEncoder.encodePassword(token, saltString));
fpst.setCreateDate(SystemTime.asDate());
customerForgotPasswordSecurityTokenDao.saveToken(fpst);
if (saltString != null) {
token = token + '-' + saltString;
}