public boolean setPassword(String username, char[] saltedSHA256PasswordHash,
			boolean isTemporary) throws IOException {
		if (!enableLocalPasswords) {
			throw new IOException("Local passwords are not used");
		}

		checkValidPasswordHash(saltedSHA256PasswordHash);

		synchronized (repositoryMgr) {
			UserEntry oldEntry = userList.remove(username);
			if (oldEntry != null) {
				UserEntry entry = new UserEntry();
				entry.username = username;
				entry.passwordHash = saltedSHA256PasswordHash;
				entry.passwordTime = isTemporary ? (new Date()).getTime() : NO_EXPIRATION;
				entry.x500User = oldEntry.x500User;
				userList.put(username, entry);
				if (entry.x500User != null) {
					dnLookupMap.put(entry.x500User, entry);
				}
				writeUserList();
				return true;
			}
			return false;
		}
	}
Sets the local password hash for a user
@param username user name/SID
@param saltedSHA256PasswordHash 4-character salt followed by 64-hex digit SHA256 password hash for new password
@param isTemporary if true password will be set to expire
@return true if successful, false if user not found
@throws IOException if error occurs while updating user file
Ghidra/Features/GhidraServer/src/main/java/ghidra/server/UserManager.java