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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user