This commit is contained in:
Florian Dold 2021-07-13 14:13:38 +02:00
parent e2287d6d5b
commit 72f7664c70
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -194,6 +194,12 @@ function kdfMod(
} }
} }
// Newer versions of node have TextEncoder and TextDecoder as a global,
// just like modern browsers.
// In older versions of node or environments that do not have these
// globals, they must be polyfilled (by adding them to globa/globalThis)
// before stringToBytes or bytesToString is called the first time.
let encoder: any; let encoder: any;
let decoder: any; let decoder: any;