Rename "encryptionAlgorithm" to "hashAlgorithmForEncryption" for clarity (#9891)

This commit is contained in:
Bernd Schoolmann 2024-07-03 10:32:19 +02:00 committed by GitHub
parent 83b8c0d50f
commit 5839999fc4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
export const applicationName = "Native Messaging Test Runner";
export const encryptionAlgorithm = "sha1";
export const hashAlgorithmForEncryption = "sha1";
export const testRsaPublicKey =
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl0Vawl/toXzkEvB82FEtqHP" +
"4xlU2ab/v0crqIfXfIoWF/XXdHGIdrZeilnRXPPJT1B9dTsasttEZNnua/0Rek/cjNDHtzT52irfoZYS7X6HNIfOi54Q+egP" +

View File

@ -22,7 +22,7 @@ import { UnencryptedMessageResponse } from "../models/native-messaging/unencrypt
import { EncryptedMessageHandlerService } from "./encrypted-message-handler.service";
const EncryptionAlgorithm = "sha1";
const HashAlgorithmForAsymmetricEncryption = "sha1";
// This service handles messages using the protocol created for the DuckDuckGo integration.
@Injectable()
@ -117,7 +117,7 @@ export class NativeMessageHandlerService {
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
secret,
remotePublicKey,
EncryptionAlgorithm,
HashAlgorithmForAsymmetricEncryption,
);
this.sendResponse({

View File

@ -27,7 +27,7 @@ import { DesktopSettingsService } from "../platform/services/desktop-settings.se
import { NativeMessageHandlerService } from "./native-message-handler.service";
const MessageValidTimeout = 10 * 1000;
const EncryptionAlgorithm = "sha1";
const HashAlgorithmForAsymmetricEncryption = "sha1";
@Injectable()
export class NativeMessagingService {
@ -227,7 +227,7 @@ export class NativeMessagingService {
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
secret,
remotePublicKey,
EncryptionAlgorithm,
HashAlgorithmForAsymmetricEncryption,
);
ipc.platform.nativeMessaging.sendMessage({
appId: appId,