From b97a6321deab996560dd3056f43e69ed9e1d7a78 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 21 Apr 2018 23:23:34 -0400 Subject: [PATCH] switch to web crypto function service --- src/background/main.background.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 7bcff651c6..c448dcbfcb 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -20,6 +20,7 @@ import { UserService, UtilsService, } from 'jslib/services'; +import { WebCryptoFunctionService } from 'jslib/services/webCryptoFunction.service'; import { ApiService as ApiServiceAbstraction, @@ -43,6 +44,7 @@ import { UserService as UserServiceAbstraction, UtilsService as UtilsServiceAbstraction, } from 'jslib/abstractions'; +import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from 'jslib/abstractions/cryptoFunction.service'; import { Analytics } from 'jslib/misc'; @@ -119,7 +121,8 @@ export default class MainBackground { this.secureStorageService = new BrowserStorageService(this.platformUtilsService, true); this.i18nService = new I18nService(BrowserApi.getUILanguage(window), BrowserApi.isSafariApi ? './_locales/' : null); - this.cryptoService = new CryptoService(this.storageService, this.secureStorageService); + const cryptoFunctionService = new WebCryptoFunctionService(window, this.platformUtilsService); + this.cryptoService = new CryptoService(this.storageService, this.secureStorageService, cryptoFunctionService); this.tokenService = new TokenService(this.storageService); this.appIdService = new AppIdService(this.storageService); this.apiService = new ApiService(this.tokenService, this.platformUtilsService,