Conversation
bhflm
requested changes
Jun 18, 2026
| @@ -1,5 +1,4 @@ | |||
| import { createCipheriv, createDecipheriv } from 'node:crypto' | |||
|
|
|||
| import { ctr, gcm } from '@noble/ciphers/aes' | |||
Contributor
There was a problem hiding this comment.
this breaks with Chrome, throws ReferenceError: Buffer is not defined before it even reaches to load AES I think
| "version": "0.2.16", | ||
| "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", | ||
| "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", | ||
| "version": "0.2.17", |
Contributor
There was a problem hiding this comment.
do we need to upgrade this ??
mattgle
marked this pull request as draft
June 18, 2026 16:19
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Swaps the AES-256-GCM/CTR helpers in
aes.tsfromnode:crypto(createCipheriv/createDecipheriv) to the pure-JS@noble/ciphers. This removes the package's only hard dependency on a Node builtin, so it runs natively in browsers and React Native without anode:cryptopolyfill.Behaviour is unchanged — same public API, error codes, IV/tag handling, and byte-for-byte output. AES-GCM/CTR are deterministic, so the existing Wycheproof (GCM) and NIST SP 800-38A (CTR) known-answer vectors and the multi-block roundtrip tests already pin output compatibility. Test-only
randomBytesusages move to@noble/hashes/utils.@noble/ciphersis pinned to^1.x(dual CJS/ESM); v2 is ESM-only and would break this package's CommonJS consumers.