allow tests

This commit is contained in:
fyears
2021-11-05 01:21:58 +08:00
parent 358311e8ac
commit 7c4a981434
4 changed files with 36 additions and 2 deletions
+6
View File
@@ -1,6 +1,12 @@
import * as base32 from "hi-base32";
import { bufferToArrayBuffer, arrayBufferToBuffer } from "./misc";
if (window === undefined) {
global.window = {
crypto: require("crypto").webcrypto,
} as any;
}
const DEFAULT_ITER = 10000;
const getKeyIVFromPassword = async (