1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-08 11:33:28 +00:00

misc utils for browser and node

This commit is contained in:
Kyle Spearrin
2018-04-20 10:59:55 -04:00
parent 171fbb0785
commit 3b2b48dd8d
5 changed files with 118 additions and 38 deletions

View File

@@ -3,7 +3,7 @@ import * as forge from 'node-forge';
import { CryptoFunctionService } from '../abstractions/cryptoFunction.service';
import { PlatformUtilsService } from '../abstractions/platformUtils.service';
import { UtilsService } from '../services/utils.service';
import { Utils } from '../misc/utils';
export class WebCryptoFunctionService implements CryptoFunctionService {
private crypto: Crypto;
@@ -122,7 +122,7 @@ export class WebCryptoFunctionService implements CryptoFunctionService {
private toBuf(value: string | ArrayBuffer): ArrayBuffer {
let buf: ArrayBuffer;
if (typeof (value) === 'string') {
buf = UtilsService.fromUtf8ToArray(value).buffer;
buf = Utils.fromUtf8ToArray(value).buffer;
} else {
buf = value;
}