Rename "encryptionAlgorithm" to "hashAlgorithmForEncryption" for clarity (#9891)
This commit is contained in:
parent
83b8c0d50f
commit
5839999fc4
|
@ -1,5 +1,5 @@
|
||||||
export const applicationName = "Native Messaging Test Runner";
|
export const applicationName = "Native Messaging Test Runner";
|
||||||
export const encryptionAlgorithm = "sha1";
|
export const hashAlgorithmForEncryption = "sha1";
|
||||||
export const testRsaPublicKey =
|
export const testRsaPublicKey =
|
||||||
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl0Vawl/toXzkEvB82FEtqHP" +
|
"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAl0Vawl/toXzkEvB82FEtqHP" +
|
||||||
"4xlU2ab/v0crqIfXfIoWF/XXdHGIdrZeilnRXPPJT1B9dTsasttEZNnua/0Rek/cjNDHtzT52irfoZYS7X6HNIfOi54Q+egP" +
|
"4xlU2ab/v0crqIfXfIoWF/XXdHGIdrZeilnRXPPJT1B9dTsasttEZNnua/0Rek/cjNDHtzT52irfoZYS7X6HNIfOi54Q+egP" +
|
||||||
|
|
|
@ -22,7 +22,7 @@ import { UnencryptedMessageResponse } from "../models/native-messaging/unencrypt
|
||||||
|
|
||||||
import { EncryptedMessageHandlerService } from "./encrypted-message-handler.service";
|
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.
|
// This service handles messages using the protocol created for the DuckDuckGo integration.
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
@ -117,7 +117,7 @@ export class NativeMessageHandlerService {
|
||||||
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
|
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
|
||||||
secret,
|
secret,
|
||||||
remotePublicKey,
|
remotePublicKey,
|
||||||
EncryptionAlgorithm,
|
HashAlgorithmForAsymmetricEncryption,
|
||||||
);
|
);
|
||||||
|
|
||||||
this.sendResponse({
|
this.sendResponse({
|
||||||
|
|
|
@ -27,7 +27,7 @@ import { DesktopSettingsService } from "../platform/services/desktop-settings.se
|
||||||
import { NativeMessageHandlerService } from "./native-message-handler.service";
|
import { NativeMessageHandlerService } from "./native-message-handler.service";
|
||||||
|
|
||||||
const MessageValidTimeout = 10 * 1000;
|
const MessageValidTimeout = 10 * 1000;
|
||||||
const EncryptionAlgorithm = "sha1";
|
const HashAlgorithmForAsymmetricEncryption = "sha1";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class NativeMessagingService {
|
export class NativeMessagingService {
|
||||||
|
@ -227,7 +227,7 @@ export class NativeMessagingService {
|
||||||
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
|
const encryptedSecret = await this.cryptoFunctionService.rsaEncrypt(
|
||||||
secret,
|
secret,
|
||||||
remotePublicKey,
|
remotePublicKey,
|
||||||
EncryptionAlgorithm,
|
HashAlgorithmForAsymmetricEncryption,
|
||||||
);
|
);
|
||||||
ipc.platform.nativeMessaging.sendMessage({
|
ipc.platform.nativeMessaging.sendMessage({
|
||||||
appId: appId,
|
appId: appId,
|
||||||
|
|
Loading…
Reference in New Issue