src/vs/platform/credentials/common/credentialsMainService.ts/BaseCredentialsMainService/setPassword
class BaseCredentialsMainService:	async setPassword(service: string, account: string, password: string): Promise<void> {
		this.logService.trace('Setting password using keytar:', service, account);
		let keytar: KeytarModule;
		try {
			keytar = await this.withKeytar();
		} catch (e) {
			this.surfaceKeytarLoadError?.(e);
			throw e;
		}

		if (isWindows && password.length > BaseCredentialsMainService.MAX_PASSWORD_LENGTH) {
			let index = 0;
			let chunk = 0;
			let hasNextChunk = true;
			while (hasNextChunk) {
				const passwordChunk = password.substring(index, index + BaseCredentialsMainService.PASSWORD_CHUNK_SIZE);
				index += BaseCredentialsMainService.PASSWORD_CHUNK_SIZE;
				hasNextChunk = password.length - index > 0;

				const content: ChunkedPassword = {
					content: passwordChunk,
					hasNextChunk: hasNextChunk
				};
				await retry(() => keytar.setPassword(service, chunk ? `${account}-${chunk}` : account, JSON.stringify(content)), 50, 3);
				chunk++;
			}

			this.logService.trace(`Got${chunk ? ` ${chunk}-chunked` : ''} password from keytar for account:`, account);
		} else {
			await retry(() => keytar.setPassword(service, account, password), 50, 3);
			this.logService.trace('Got password from keytar for account:', account);
		}

		this._onDidChangePassword.fire({ service, account });
	}