initial commit
This commit is contained in:
9
server/node_modules/jose/dist/node/esm/runtime/zlib.js
generated
vendored
Normal file
9
server/node_modules/jose/dist/node/esm/runtime/zlib.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { promisify } from 'util';
|
||||
import { inflateRaw as inflateRawCb, deflateRaw as deflateRawCb } from 'zlib';
|
||||
import { JWEDecompressionFailed } from '../util/errors.js';
|
||||
const inflateRaw = promisify(inflateRawCb);
|
||||
const deflateRaw = promisify(deflateRawCb);
|
||||
export const inflate = (input) => inflateRaw(input, { maxOutputLength: 250000 }).catch(() => {
|
||||
throw new JWEDecompressionFailed();
|
||||
});
|
||||
export const deflate = (input) => deflateRaw(input);
|
||||
Reference in New Issue
Block a user