1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00

[TypeScript] Convert background entry script to TypeScript (#419)

* Convert background entry file to typescript. Remove global forge & tldjs variables.

* Minor cleanup.
This commit is contained in:
Oscar Hinton
2017-12-06 19:51:49 +01:00
committed by Kyle Spearrin
parent 97b509e1f6
commit 81fcfb4f6f
10 changed files with 59 additions and 49 deletions

View File

@@ -1,3 +1,5 @@
import * as forge from 'node-forge';
import { EncryptionType } from '../../enums/encryptionType.enum';
import SymmetricCryptoKeyBuffers from './symmetricCryptoKeyBuffers';
@@ -21,7 +23,7 @@ export default class SymmetricCryptoKey {
throw new Error('Must provide keyBytes');
}
const buffer = forge.util.createBuffer(keyBytes);
const buffer = (forge as any).util.createBuffer(keyBytes);
if (!buffer || buffer.length() === 0) {
throw new Error('Couldn\'t make buffer');
}