generated from 47ng/typescript-library-starter
-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fix decryption of strings larger than 4 MiB (#411)
* fix: fix decrypting strings larger than 4 MiB The `cloakedStringRegex` fails to parse ciphertexts larger than about 4 MiB. This is due to [limitations in V8's regex engine][1]. I've adapted the implementation from validatorjs/validator.js#503 under the MIT license, as it solves the error. [1]: https://issues.chromium.org/issues/42207207 * feat: export `parseCloakedString` function This function can be used instead of `cloakedStringRegex` on large strings. * feat: deprecate `cloakedStringRegex` This regex fails on large 4 MiB + strings. `parseCloakedString` should be used instead when possible. * test: test decrypting strings larger than 4 MiB This fails in Node.JS v20.17.0 with @47ng/cloak v1.1.0. * chore: Make hex & base64 Regexes case-insensitive --------- Co-authored-by: François Best <github@francoisbest.com>
- Loading branch information
1 parent
b4eefb7
commit fc619b7
Showing
2 changed files
with
68 additions
and
6 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