transaction = session.beginTransaction();
byte[] salt = UserPasswordUtil.getSalt();
byte[] passwordHash = UserPasswordUtil.hashPassword(password, salt);
((SqlUser) user).setPassword(salt, passwordHash);
session.update(user);
transaction.commit();
} catch (HibernateException e) {
if (transaction != null) {
transaction.rollback();
}