From da1cce6956569c367eebf9c4f23fde85684b4a74 Mon Sep 17 00:00:00 2001 From: Mohit Tejani Date: Tue, 19 Sep 2023 18:50:34 +0530 Subject: [PATCH] rever cryptors in config --- src/core/components/config.js | 5 ----- src/core/components/subscription_manager.js | 4 +--- src/core/pubnub-common.js | 3 --- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/core/components/config.js b/src/core/components/config.js index 1e6759fda..69ccb8fc1 100644 --- a/src/core/components/config.js +++ b/src/core/components/config.js @@ -135,9 +135,6 @@ export default class { customDecrypt; // function used to decrypt old version messages - // registered cryptors for encryption and decryption of messages. - cryptors; - // File Upload // How many times the publish-file should be retried before giving up @@ -178,8 +175,6 @@ export default class { this.customEncrypt = setup.customEncrypt; this.customDecrypt = setup.customDecrypt; - this.cryptors = setup.cryptors || []; - this.fileUploadPublishRetryLimit = setup.fileUploadPublishRetryLimit ?? 5; this.useRandomIVs = setup.useRandomIVs ?? true; diff --git a/src/core/components/subscription_manager.js b/src/core/components/subscription_manager.js index fa02e37ea..e8bc96864 100644 --- a/src/core/components/subscription_manager.js +++ b/src/core/components/subscription_manager.js @@ -69,8 +69,7 @@ export default class { getFileUrl, config, crypto, - listenerManager, - cryptors, + listenerManager }) { this._listenerManager = listenerManager; this._config = config; @@ -730,7 +729,6 @@ export default class { if (this._config.cipherKey) { announce.message = this._crypto.decrypt(message.payload); - //TODO: select one of the cryptors and decrypt. } else { announce.message = message.payload; } diff --git a/src/core/pubnub-common.js b/src/core/pubnub-common.js index a28a88114..8fb3a5b6c 100644 --- a/src/core/pubnub-common.js +++ b/src/core/pubnub-common.js @@ -280,7 +280,6 @@ export default class { const crypto = new Crypto({ config }); // LEGACY const { cryptography } = setup; - const cryptors = [crypto, cryptography, ...config.cryptors]; networking.init(config); @@ -298,7 +297,6 @@ export default class { networking, crypto, cryptography, - cryptors, tokenManager, telemetryManager, PubNubFile: setup.PubNubFile, @@ -343,7 +341,6 @@ export default class { config: modules.config, listenerManager, getFileUrl: (params) => getFileUrlFunction(modules, params), - cryptors: modules.cryptors, }); this.subscribe = subscriptionManager.adaptSubscribeChange.bind(subscriptionManager);