1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-12-25 16:59:17 +01:00

switch to web crypto function service

This commit is contained in:
Kyle Spearrin 2018-04-21 23:23:34 -04:00
parent 3eaa83ded4
commit b97a6321de

View File

@ -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,