/// <summary> /// Set password /// </summary> /// <param name="user"></param> /// <param name="password"></param> public static void SetPassword(SystemUser user, string password) { string salt = SystemUser.GeneratePasswordSalt(16); string passwordHash = SystemUser.GeneratePasswordHash(user.Username, password, salt); user.Password = passwordHash; user.PasswordSalt = salt; }