1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[PM-21001] Move autofill code to new encrypt service interface (#14548)

* Move autofill code to new encrypt service interface

* Fix test runner
This commit is contained in:
Bernd Schoolmann
2025-05-12 15:31:03 +02:00
committed by GitHub
parent 87b875c48b
commit aca8ab8e40
2 changed files with 4 additions and 9 deletions

View File

@@ -220,7 +220,7 @@ export default class NativeMessageService {
const sharedKey = await this.getSharedKeyForKey(key);
return this.encryptService.encrypt(commandDataString, sharedKey);
return this.encryptService.encryptString(commandDataString, sharedKey);
}
private async decryptResponsePayload(
@@ -228,11 +228,7 @@ export default class NativeMessageService {
key: string,
): Promise<DecryptedCommandData> {
const sharedKey = await this.getSharedKeyForKey(key);
const decrypted = await this.encryptService.decryptToUtf8(
payload,
sharedKey,
"native-messaging-session",
);
const decrypted = await this.encryptService.decryptString(payload, sharedKey);
return JSON.parse(decrypted);
}