-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: stop testing JWE RSA1_5 Algorithm
- Loading branch information
Showing
7 changed files
with
33 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { promisify } from 'util' | ||
import { inflateRaw as inflateRawCb, deflateRaw as deflateRawCb } from 'zlib' | ||
import { JWEDecompressionFailed } from '../../util/errors.js' | ||
|
||
import type { InflateFunction, DeflateFunction } from '../../types.d' | ||
|
||
const inflateRaw = promisify(inflateRawCb) | ||
const deflateRaw = promisify(deflateRawCb) | ||
|
||
export const inflate: InflateFunction = (input: Uint8Array) => | ||
inflateRaw(input, { maxOutputLength: 250_000 }) | ||
inflateRaw(input, { maxOutputLength: 250_000 }).catch(() => { | ||
throw new JWEDecompressionFailed() | ||
}) | ||
export const deflate: DeflateFunction = (input: Uint8Array) => deflateRaw(input) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters