From 3e8194a3f78f99f6854e1b3388d453e73f8c0345 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Wed, 21 Apr 2021 14:20:20 -0500 Subject: [PATCH] Update jslib (#942) * Update jslib * stub out new platformUtilsService method * Throw not implemented * Update jslib * This interface method was reverted --- jslib | 2 +- .../organizations/manage/collection-add-edit.component.ts | 4 ++-- src/app/settings/change-password.component.ts | 6 +++--- src/app/settings/update-key.component.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/jslib b/jslib index 66eec2b022..3c872e56f2 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 66eec2b02260ce41227e83153020f561d105b1ba +Subproject commit 3c872e56f27ae78fb922b765d7601886b5c39f78 diff --git a/src/app/organizations/manage/collection-add-edit.component.ts b/src/app/organizations/manage/collection-add-edit.component.ts index 9fbec9745a..cb6fc3767e 100644 --- a/src/app/organizations/manage/collection-add-edit.component.ts +++ b/src/app/organizations/manage/collection-add-edit.component.ts @@ -14,7 +14,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service'; import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service'; import { UserService } from 'jslib/abstractions/user.service'; -import { CipherString } from 'jslib/models/domain/cipherString'; +import { EncString } from 'jslib/models/domain/encString'; import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey'; import { CollectionRequest } from 'jslib/models/request/collectionRequest'; import { SelectionReadOnlyRequest } from 'jslib/models/request/selectionReadOnlyRequest'; @@ -63,7 +63,7 @@ export class CollectionAddEditComponent implements OnInit { this.title = this.i18nService.t('editCollection'); try { const collection = await this.apiService.getCollectionDetails(this.organizationId, this.collectionId); - this.name = await this.cryptoService.decryptToUtf8(new CipherString(collection.name), this.orgKey); + this.name = await this.cryptoService.decryptToUtf8(new EncString(collection.name), this.orgKey); this.externalId = collection.externalId; if (collection.groups != null && this.groups.length > 0) { collection.groups.forEach(s => { diff --git a/src/app/settings/change-password.component.ts b/src/app/settings/change-password.component.ts index cdab066323..b572cd87a0 100644 --- a/src/app/settings/change-password.component.ts +++ b/src/app/settings/change-password.component.ts @@ -19,7 +19,7 @@ import { import { EmergencyAccessStatusType } from 'jslib/enums/emergencyAccessStatusType'; import { Utils } from 'jslib/misc/utils'; -import { CipherString } from 'jslib/models/domain/cipherString'; +import { EncString } from 'jslib/models/domain/encString'; import { SymmetricCryptoKey } from 'jslib/models/domain/symmetricCryptoKey'; import { CipherWithIdRequest } from 'jslib/models/request/cipherWithIdRequest'; @@ -108,7 +108,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent { } async performSubmitActions(newMasterPasswordHash: string, newKey: SymmetricCryptoKey, - newEncKey: [SymmetricCryptoKey, CipherString]) { + newEncKey: [SymmetricCryptoKey, EncString]) { const request = new PasswordRequest(); request.masterPasswordHash = await this.cryptoService.hashPassword(this.currentMasterPassword, null); request.newMasterPasswordHash = newMasterPasswordHash; @@ -136,7 +136,7 @@ export class ChangePasswordComponent extends BaseChangePasswordComponent { private async updateKey(key: SymmetricCryptoKey, masterPasswordHash: string) { const encKey = await this.cryptoService.makeEncKey(key); const privateKey = await this.cryptoService.getPrivateKey(); - let encPrivateKey: CipherString = null; + let encPrivateKey: EncString = null; if (privateKey != null) { encPrivateKey = await this.cryptoService.encrypt(privateKey, encKey[0]); } diff --git a/src/app/settings/update-key.component.ts b/src/app/settings/update-key.component.ts index e3adb61476..9eee05df8d 100644 --- a/src/app/settings/update-key.component.ts +++ b/src/app/settings/update-key.component.ts @@ -13,7 +13,7 @@ import { I18nService } from 'jslib/abstractions/i18n.service'; import { MessagingService } from 'jslib/abstractions/messaging.service'; import { SyncService } from 'jslib/abstractions/sync.service'; -import { CipherString } from 'jslib/models/domain/cipherString'; +import { EncString } from 'jslib/models/domain/encString'; import { CipherWithIdRequest } from 'jslib/models/request/cipherWithIdRequest'; import { FolderWithIdRequest } from 'jslib/models/request/folderWithIdRequest'; @@ -64,7 +64,7 @@ export class UpdateKeyComponent { const key = await this.cryptoService.getKey(); const encKey = await this.cryptoService.makeEncKey(key); const privateKey = await this.cryptoService.getPrivateKey(); - let encPrivateKey: CipherString = null; + let encPrivateKey: EncString = null; if (privateKey != null) { encPrivateKey = await this.cryptoService.encrypt(privateKey, encKey[0]); }