1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-14 15:23:33 +00: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, UserService,
UtilsService, UtilsService,
} from 'jslib/services'; } from 'jslib/services';
import { WebCryptoFunctionService } from 'jslib/services/webCryptoFunction.service';
import { import {
ApiService as ApiServiceAbstraction, ApiService as ApiServiceAbstraction,
@@ -43,6 +44,7 @@ import {
UserService as UserServiceAbstraction, UserService as UserServiceAbstraction,
UtilsService as UtilsServiceAbstraction, UtilsService as UtilsServiceAbstraction,
} from 'jslib/abstractions'; } from 'jslib/abstractions';
import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from 'jslib/abstractions/cryptoFunction.service';
import { Analytics } from 'jslib/misc'; import { Analytics } from 'jslib/misc';
@@ -119,7 +121,8 @@ export default class MainBackground {
this.secureStorageService = new BrowserStorageService(this.platformUtilsService, true); this.secureStorageService = new BrowserStorageService(this.platformUtilsService, true);
this.i18nService = new I18nService(BrowserApi.getUILanguage(window), this.i18nService = new I18nService(BrowserApi.getUILanguage(window),
BrowserApi.isSafariApi ? './_locales/' : null); 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.tokenService = new TokenService(this.storageService);
this.appIdService = new AppIdService(this.storageService); this.appIdService = new AppIdService(this.storageService);
this.apiService = new ApiService(this.tokenService, this.platformUtilsService, this.apiService = new ApiService(this.tokenService, this.platformUtilsService,