From 2501c1a6234af1e1ba430add36bee4a1c4faaa72 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 21 Apr 2018 23:14:58 -0400 Subject: [PATCH] use new crypto function service --- jslib | 2 +- src/app/services/services.module.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jslib b/jslib index 2c2128a871..fc1114a6bd 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 2c2128a871dc488cd845008cf7fe8725e41b4801 +Subproject commit fc1114a6bd66b62b7821958fca2a0c9260c08ddc diff --git a/src/app/services/services.module.ts b/src/app/services/services.module.ts index 53ab4ff6e2..e17537d0de 100644 --- a/src/app/services/services.module.ts +++ b/src/app/services/services.module.ts @@ -40,6 +40,7 @@ import { TokenService } from 'jslib/services/token.service'; import { TotpService } from 'jslib/services/totp.service'; import { UserService } from 'jslib/services/user.service'; import { UtilsService } from 'jslib/services/utils.service'; +import { WebCryptoFunctionService } from 'jslib/services/webCryptoFunction.service'; import { ApiService as ApiServiceAbstraction } from 'jslib/abstractions/api.service'; import { AppIdService as AppIdServiceAbstraction } from 'jslib/abstractions/appId.service'; @@ -48,6 +49,7 @@ import { AuthService as AuthServiceAbstraction } from 'jslib/abstractions/auth.s import { CipherService as CipherServiceAbstraction } from 'jslib/abstractions/cipher.service'; import { CollectionService as CollectionServiceAbstraction } from 'jslib/abstractions/collection.service'; import { CryptoService as CryptoServiceAbstraction } from 'jslib/abstractions/crypto.service'; +import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from 'jslib/abstractions/cryptoFunction.service'; import { EnvironmentService as EnvironmentServiceAbstraction } from 'jslib/abstractions/environment.service'; import { FolderService as FolderServiceAbstraction } from 'jslib/abstractions/folder.service'; import { I18nService as I18nServiceAbstraction } from 'jslib/abstractions/i18n.service'; @@ -76,7 +78,9 @@ const broadcasterService = new BroadcasterService(); const messagingService = new DesktopRendererMessagingService(broadcasterService); const storageService: StorageServiceAbstraction = new DesktopStorageService(); const secureStorageService: StorageServiceAbstraction = new DesktopRendererSecureStorageService(); -const cryptoService = new CryptoService(storageService, secureStorageService); +const cryptoFunctionService: CryptoFunctionServiceAbstraction = new WebCryptoFunctionService(window, + platformUtilsService); +const cryptoService = new CryptoService(storageService, secureStorageService, cryptoFunctionService); const tokenService = new TokenService(storageService); const appIdService = new AppIdService(storageService); const apiService = new ApiService(tokenService, platformUtilsService,