migrationToBeDone set if hash diff
MODIFY
src/server/rest/v1/service/SettingService.ts
src/server/rest/v1/service/SettingService.ts
@@ -211,6 +211,9 @@ export default class SettingService {
setting.lastChangedOn = new Date();
if (settingUpdate.identifier === TenantComponents.CRYPTO) {
+ if (Cypher.hash(settingUpdate.content.crypto.key) !== Cypher.hash(setting.content.crypto.key)) {
+ settingUpdate.content.crypto.migrationToBeDone = true;
+ }
settingUpdate.content.crypto.formerKey = setting.content.crypto.key;
}

MODIFY
src/server/rest/v1/service/security/SettingSecurity.ts
src/server/rest/v1/service/security/SettingSecurity.ts
@@ -199,8 +199,7 @@ export default class SettingSecurity {
blockCypher: sanitize(request.content.crypto.formerKeyProperties?.blockCypher),
blockSize: sanitize(request.content.crypto.formerKeyProperties?.blockSize),
operationMode: sanitize(request.content.crypto.formerKeyProperties?.operationMode)
- },
- migrationToBeDone: sanitize(request.content.crypto.migrationToBeDone)
+ }
};
break;
}

migrationToBeDone set if hash diff