meteor-node-stubs 1.2.17 → 1.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@meteorjs/browserify-sign/browser/sign.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/browser/verify.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/jodid.js +82 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/secp256k1.js +41 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/index.js +153 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/package.json +21 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/.gitkeep +0 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.js +8961 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.min.js +1 -0
- package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/api-test.js +20 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/curve-test.js +357 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdh-test.js +43 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdsa-test.js +547 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ed25519-test.js +138 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/sign.input +1024 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/index.js +10 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/unittests.html +39 -0
- package/node_modules/@meteorjs/browserify-sign/package.json +22 -5
- package/node_modules/@meteorjs/create-ecdh/browser.js +1 -1
- package/node_modules/@meteorjs/create-ecdh/elliptic/README.md +238 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/jodid.js +82 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/secp256k1.js +41 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/index.js +153 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/package.json +21 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/.gitkeep +0 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.js +8961 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.min.js +1 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/base.js +381 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/edwards.js +435 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/index.js +8 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/mont.js +178 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/short.js +938 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curves.js +206 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/index.js +278 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/key.js +121 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/signature.js +176 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/index.js +121 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/key.js +95 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/signature.js +66 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/utils.js +122 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic.js +13 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/api-test.js +20 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/curve-test.js +357 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdh-test.js +43 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdsa-test.js +547 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ed25519-test.js +138 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/sign.input +1024 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/index.js +10 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/unittests.html +39 -0
- package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/lib/bn.js +1 -0
- package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/package.json +1 -1
- package/node_modules/@meteorjs/create-ecdh/package.json +23 -5
- package/node_modules/asn1.js/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/asn1.js/node_modules/bn.js/package.json +1 -1
- package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/available-typed-arrays/.eslintrc +0 -4
- package/node_modules/available-typed-arrays/CHANGELOG.md +21 -0
- package/node_modules/available-typed-arrays/README.md +16 -13
- package/node_modules/available-typed-arrays/index.d.ts +8 -0
- package/node_modules/available-typed-arrays/index.js +4 -14
- package/node_modules/available-typed-arrays/package.json +26 -15
- package/node_modules/available-typed-arrays/tsconfig.json +49 -0
- package/node_modules/bn.js/README.md +11 -5
- package/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/bn.js/package.json +1 -1
- package/node_modules/browserify-rsa/CHANGELOG.md +98 -0
- package/node_modules/browserify-rsa/README.md +0 -2
- package/node_modules/browserify-rsa/index.js +31 -28
- package/node_modules/browserify-rsa/package.json +64 -29
- package/node_modules/call-bind/CHANGELOG.md +13 -0
- package/node_modules/call-bind/index.js +6 -17
- package/node_modules/call-bind/package.json +14 -16
- package/node_modules/call-bind/test/index.js +4 -10
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/{has-proto → call-bind-apply-helpers}/LICENSE +1 -1
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/{@meteorjs/browserify-sign/node_modules/bn.js → call-bound}/LICENSE +3 -1
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/cipher-base/.eslintrc +24 -1
- package/node_modules/cipher-base/.github/FUNDING.yml +12 -0
- package/node_modules/cipher-base/CHANGELOG.md +66 -0
- package/node_modules/cipher-base/index.js +145 -77
- package/node_modules/cipher-base/package.json +60 -30
- package/node_modules/cipher-base/test/index.js +221 -0
- package/node_modules/des.js/lib/des/cipher.js +1 -0
- package/node_modules/des.js/lib/des/des.js +8 -0
- package/node_modules/des.js/package.json +3 -4
- package/node_modules/des.js/test/cbc-test.js +5 -5
- package/node_modules/des.js/test/des-test.js +9 -9
- package/node_modules/des.js/test/ede-test.js +39 -6
- package/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/diffie-hellman/node_modules/bn.js/package.json +1 -1
- package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/{@meteorjs/crypto-browserify/node_modules/hash-base → dunder-proto}/LICENSE +6 -6
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +14 -0
- package/node_modules/es-define-property/index.js +1 -3
- package/node_modules/es-define-property/package.json +12 -12
- package/node_modules/es-define-property/test/index.js +1 -0
- package/node_modules/es-define-property/tsconfig.json +2 -42
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/{elliptic/node_modules/bn.js → es-object-atoms}/LICENSE +3 -1
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/for-each/.eslintrc +16 -2
- package/node_modules/{has-proto → for-each}/.github/FUNDING.yml +1 -1
- package/node_modules/for-each/.github/SECURITY.md +3 -0
- package/node_modules/for-each/.nycrc +8 -0
- package/node_modules/for-each/CHANGELOG.md +107 -0
- package/node_modules/for-each/README.md +0 -4
- package/node_modules/for-each/index.d.ts +35 -0
- package/node_modules/for-each/index.js +11 -4
- package/node_modules/for-each/package.json +47 -36
- package/node_modules/for-each/test/test.js +54 -12
- package/node_modules/for-each/tsconfig.json +8 -0
- package/node_modules/get-intrinsic/.eslintrc +4 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +43 -0
- package/node_modules/get-intrinsic/index.js +40 -21
- package/node_modules/get-intrinsic/package.json +24 -20
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/{has-proto → get-proto}/package.json +33 -26
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/CHANGELOG.md +20 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +2 -3
- package/node_modules/gopd/package.json +16 -10
- package/node_modules/gopd/test/index.js +2 -1
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +16 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +1 -0
- package/node_modules/has-symbols/package.json +19 -9
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +5 -2
- package/node_modules/has-symbols/test/shams/core-js.js +1 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
- package/node_modules/has-symbols/test/tests.js +4 -2
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +0 -6
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +1 -0
- package/node_modules/has-tostringtag/package.json +37 -13
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +1 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
- package/node_modules/has-tostringtag/test/tests.js +2 -1
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hash-base/README.md +15 -15
- package/node_modules/hash-base/index.js +52 -9
- package/node_modules/hash-base/package.json +40 -40
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/index.d.ts +3 -3
- package/node_modules/hasown/index.js +1 -1
- package/node_modules/hasown/package.json +16 -15
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/is-arguments/.eslintrc +0 -1
- package/node_modules/is-arguments/CHANGELOG.md +22 -0
- package/node_modules/is-arguments/README.md +11 -11
- package/node_modules/is-arguments/index.d.ts +6 -0
- package/node_modules/is-arguments/index.js +19 -8
- package/node_modules/is-arguments/package.json +25 -11
- package/node_modules/is-arguments/test/index.js +4 -1
- package/node_modules/is-arguments/tsconfig.json +9 -0
- package/node_modules/is-generator-function/.eslintrc +1 -1
- package/node_modules/is-generator-function/CHANGELOG.md +21 -0
- package/node_modules/is-generator-function/index.d.ts +3 -0
- package/node_modules/is-generator-function/index.js +16 -7
- package/node_modules/is-generator-function/package.json +30 -11
- package/node_modules/is-generator-function/test/corejs.js +1 -0
- package/node_modules/is-generator-function/test/index.js +4 -7
- package/node_modules/is-generator-function/test/uglified.js +1 -0
- package/node_modules/is-generator-function/tsconfig.json +9 -0
- package/node_modules/is-regex/.editorconfig +23 -0
- package/node_modules/is-regex/.eslintrc +10 -0
- package/node_modules/is-regex/.nycrc +10 -0
- package/node_modules/is-regex/CHANGELOG.md +233 -0
- package/node_modules/is-regex/LICENSE +20 -0
- package/node_modules/is-regex/README.md +52 -0
- package/node_modules/is-regex/index.d.ts +3 -0
- package/node_modules/is-regex/index.js +69 -0
- package/node_modules/is-regex/package.json +104 -0
- package/node_modules/is-regex/test/index.js +121 -0
- package/node_modules/is-regex/tsconfig.json +9 -0
- package/node_modules/is-typed-array/CHANGELOG.md +32 -0
- package/node_modules/is-typed-array/index.d.ts +9 -0
- package/node_modules/is-typed-array/index.js +1 -0
- package/node_modules/is-typed-array/package.json +23 -10
- package/node_modules/is-typed-array/test/index.js +9 -1
- package/node_modules/is-typed-array/tsconfig.json +6 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/miller-rabin/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/miller-rabin/node_modules/bn.js/package.json +1 -1
- package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/object-inspect/CHANGELOG.md +20 -0
- package/node_modules/object-inspect/index.js +27 -10
- package/node_modules/object-inspect/package.json +9 -8
- package/node_modules/object-inspect/test/quoteStyle.js +9 -0
- package/node_modules/object-inspect/test/values.js +50 -0
- package/node_modules/object-is/.eslintrc +1 -1
- package/node_modules/object-is/.nycrc +0 -4
- package/node_modules/object-is/CHANGELOG.md +25 -0
- package/node_modules/object-is/README.md +20 -20
- package/node_modules/object-is/package.json +23 -14
- package/node_modules/object.assign/CHANGELOG.md +21 -0
- package/node_modules/object.assign/dist/browser.js +495 -135
- package/node_modules/object.assign/implementation.js +6 -6
- package/node_modules/object.assign/package.json +14 -14
- package/node_modules/object.assign/test/tests.js +2 -2
- package/node_modules/possible-typed-array-names/.eslintrc +5 -0
- package/node_modules/possible-typed-array-names/.github/FUNDING.yml +12 -0
- package/node_modules/possible-typed-array-names/CHANGELOG.md +29 -0
- package/node_modules/possible-typed-array-names/LICENSE +21 -0
- package/node_modules/possible-typed-array-names/README.md +50 -0
- package/node_modules/possible-typed-array-names/index.d.ts +16 -0
- package/node_modules/possible-typed-array-names/index.js +17 -0
- package/node_modules/possible-typed-array-names/package.json +84 -0
- package/node_modules/possible-typed-array-names/test/index.js +19 -0
- package/node_modules/possible-typed-array-names/tsconfig.json +9 -0
- package/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/public-encrypt/node_modules/bn.js/package.json +1 -1
- package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/qs/.eslintrc +1 -0
- package/node_modules/qs/CHANGELOG.md +22 -0
- package/node_modules/qs/README.md +25 -1
- package/node_modules/qs/dist/qs.js +95 -44
- package/node_modules/qs/lib/parse.js +44 -12
- package/node_modules/qs/lib/stringify.js +11 -6
- package/node_modules/qs/lib/utils.js +7 -4
- package/node_modules/qs/package.json +9 -7
- package/node_modules/qs/test/parse.js +133 -27
- package/node_modules/qs/test/stringify.js +19 -11
- package/node_modules/qs/test/utils.js +126 -0
- package/node_modules/safe-regex-test/.eslintrc +9 -0
- package/node_modules/safe-regex-test/.github/FUNDING.yml +12 -0
- package/node_modules/safe-regex-test/.nycrc +13 -0
- package/node_modules/safe-regex-test/CHANGELOG.md +55 -0
- package/node_modules/safe-regex-test/LICENSE +21 -0
- package/node_modules/safe-regex-test/README.md +46 -0
- package/node_modules/safe-regex-test/index.d.ts +3 -0
- package/node_modules/safe-regex-test/index.js +17 -0
- package/node_modules/safe-regex-test/package.json +87 -0
- package/node_modules/safe-regex-test/test/index.js +41 -0
- package/node_modules/safe-regex-test/tsconfig.json +9 -0
- package/node_modules/side-channel/.eslintrc +1 -0
- package/node_modules/side-channel/CHANGELOG.md +15 -0
- package/node_modules/side-channel/README.md +60 -1
- package/node_modules/side-channel/index.d.ts +9 -22
- package/node_modules/side-channel/index.js +20 -106
- package/node_modules/side-channel/package.json +20 -19
- package/node_modules/side-channel/test/index.js +76 -55
- package/node_modules/side-channel/tsconfig.json +2 -43
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/which-typed-array/.eslintrc +1 -0
- package/node_modules/which-typed-array/CHANGELOG.md +57 -0
- package/node_modules/which-typed-array/index.d.ts +62 -0
- package/node_modules/which-typed-array/index.js +50 -25
- package/node_modules/which-typed-array/package.json +28 -13
- package/node_modules/which-typed-array/test/index.js +7 -1
- package/node_modules/which-typed-array/tsconfig.json +9 -0
- package/package.json +2 -3
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/README.md +0 -214
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/lib/bn.js +0 -3547
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/package.json +0 -39
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/LICENSE +0 -21
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/README.md +0 -48
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/index.js +0 -138
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/package.json +0 -42
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/README.md +0 -48
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/index.js +0 -95
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/package.json +0 -41
- package/node_modules/available-typed-arrays/.eslintignore +0 -1
- package/node_modules/bn.js/CHANGELOG.md +0 -51
- package/node_modules/cipher-base/.npmignore +0 -1
- package/node_modules/cipher-base/.travis.yml +0 -6
- package/node_modules/cipher-base/test.js +0 -111
- package/node_modules/elliptic/node_modules/bn.js/README.md +0 -200
- package/node_modules/elliptic/node_modules/bn.js/lib/bn.js +0 -3446
- package/node_modules/elliptic/node_modules/bn.js/package.json +0 -36
- package/node_modules/elliptic/package.json +0 -56
- package/node_modules/for-each/.travis.yml +0 -45
- package/node_modules/for-each/test/.eslintrc +0 -8
- package/node_modules/has-proto/CHANGELOG.md +0 -23
- package/node_modules/has-proto/README.md +0 -38
- package/node_modules/has-proto/index.js +0 -11
- package/node_modules/has-proto/test/index.js +0 -19
- package/node_modules/hasown/index.d.ts.map +0 -1
- package/node_modules/is-arguments/.eslintignore +0 -1
- package/node_modules/is-generator-function/.eslintignore +0 -1
- package/node_modules/object-is/.eslintignore +0 -1
- package/node_modules/object.assign/test.html +0 -18458
- package/node_modules/parse-asn1/node_modules/hash-base/LICENSE +0 -21
- package/node_modules/parse-asn1/node_modules/hash-base/README.md +0 -48
- package/node_modules/parse-asn1/node_modules/hash-base/index.js +0 -95
- package/node_modules/parse-asn1/node_modules/hash-base/package.json +0 -41
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/README.md +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/base.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/edwards.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/mont.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/short.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curves.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/key.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/signature.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/key.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/signature.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/precomputed/secp256k1.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/utils.js +0 -0
- /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var callBound = require('../');
|
|
6
|
+
|
|
7
|
+
/** @template {true} T @template U @typedef {T extends U ? T : never} AssertType */
|
|
8
|
+
|
|
9
|
+
test('callBound', function (t) {
|
|
10
|
+
// static primitive
|
|
11
|
+
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
|
12
|
+
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
|
13
|
+
|
|
14
|
+
// static non-function object
|
|
15
|
+
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
|
16
|
+
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
|
17
|
+
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
|
18
|
+
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
|
19
|
+
|
|
20
|
+
// static function
|
|
21
|
+
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
|
22
|
+
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
|
23
|
+
|
|
24
|
+
// prototype primitive
|
|
25
|
+
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
|
26
|
+
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
|
27
|
+
|
|
28
|
+
var x = callBound('Object.prototype.toString');
|
|
29
|
+
var y = callBound('%Object.prototype.toString%');
|
|
30
|
+
|
|
31
|
+
// prototype function
|
|
32
|
+
t.notEqual(x, Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
|
33
|
+
t.notEqual(y, Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
|
34
|
+
t.equal(x(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
|
35
|
+
t.equal(y(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
|
36
|
+
|
|
37
|
+
t['throws'](
|
|
38
|
+
// @ts-expect-error
|
|
39
|
+
function () { callBound('does not exist'); },
|
|
40
|
+
SyntaxError,
|
|
41
|
+
'nonexistent intrinsic throws'
|
|
42
|
+
);
|
|
43
|
+
t['throws'](
|
|
44
|
+
// @ts-expect-error
|
|
45
|
+
function () { callBound('does not exist', true); },
|
|
46
|
+
SyntaxError,
|
|
47
|
+
'allowMissing arg still throws for unknown intrinsic'
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
|
51
|
+
st['throws'](
|
|
52
|
+
function () { callBound('WeakRef'); },
|
|
53
|
+
TypeError,
|
|
54
|
+
'real but absent intrinsic throws'
|
|
55
|
+
);
|
|
56
|
+
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
|
57
|
+
st.end();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
t.end();
|
|
61
|
+
});
|
|
@@ -1,3 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
2
|
+
"root": true,
|
|
3
|
+
|
|
4
|
+
"extends": "@ljharb",
|
|
5
|
+
|
|
6
|
+
"rules": {
|
|
7
|
+
"func-style": "off",
|
|
8
|
+
},
|
|
9
|
+
|
|
10
|
+
"globals": {
|
|
11
|
+
"Uint8Array": false,
|
|
12
|
+
"Uint16Array": false,
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
"overrides": [
|
|
16
|
+
{
|
|
17
|
+
"files": [
|
|
18
|
+
"./index.js",
|
|
19
|
+
"./test/index.js",
|
|
20
|
+
],
|
|
21
|
+
"rules": {
|
|
22
|
+
"no-underscore-dangle": "warn",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
],
|
|
3
26
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/cipher-base
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.0.6](https://github.com/browserify/cipher-base/compare/v1.0.5...v1.0.6) - 2024-11-26
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] io.js 3.0 - Node.js 5.3 typed array support [`b7ddd2a`](https://github.com/browserify/cipher-base/commit/b7ddd2ac24e65cc47befc1e0eb5026422f8ab037)
|
|
13
|
+
|
|
14
|
+
## [v1.0.5](https://github.com/browserify/cipher-base/compare/v1.0.4...v1.0.5) - 2024-11-17
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [Tests] standard -> eslint, make test dir, etc [`ae02fd6`](https://github.com/browserify/cipher-base/commit/ae02fd6624c41ac4ac18077be797111d1955bc76)
|
|
19
|
+
- [Tests] migrate from travis to GHA [`66387d7`](https://github.com/browserify/cipher-base/commit/66387d71461287ad9067bb1bcbfdc47403a33ee7)
|
|
20
|
+
- [meta] fix package.json indentation [`5c02918`](https://github.com/browserify/cipher-base/commit/5c02918ac58c875ed36913c2dc3e1043f4d1c99c)
|
|
21
|
+
- [Fix] return valid values on multi-byte-wide TypedArray input [`8fd1364`](https://github.com/browserify/cipher-base/commit/8fd136432ca298a664f5637629cf2b42a6c7f294)
|
|
22
|
+
- [meta] add `auto-changelog` [`88dc806`](https://github.com/browserify/cipher-base/commit/88dc806806d3dc41444dbf639c87c00f82c949b3)
|
|
23
|
+
- [meta] add `npmignore` and `safe-publish-latest` [`7a137d7`](https://github.com/browserify/cipher-base/commit/7a137d749ce7ea7ea56b9c096844b1b8ab723f61)
|
|
24
|
+
- Only apps should have lockfiles [`42528f2`](https://github.com/browserify/cipher-base/commit/42528f291db16bf2e7d5f831ebe2ad87fd0b1f42)
|
|
25
|
+
- [Deps] update `inherits`, `safe-buffer` [`0e7a2d9`](https://github.com/browserify/cipher-base/commit/0e7a2d9a33a391e82fa9cf512d6e25cc91ab8613)
|
|
26
|
+
- [meta] add missing `engines.node` [`f2dc13e`](https://github.com/browserify/cipher-base/commit/f2dc13e47bbcf3c873db9a9e0f83e5f29d0783fe)
|
|
27
|
+
|
|
28
|
+
## [v1.0.4](https://github.com/browserify/cipher-base/compare/v1.0.3...v1.0.4) - 2017-07-06
|
|
29
|
+
|
|
30
|
+
### Merged
|
|
31
|
+
|
|
32
|
+
- Safe Buffer & License [`#8`](https://github.com/browserify/cipher-base/pull/8)
|
|
33
|
+
- fix break in node 8 [`#9`](https://github.com/browserify/cipher-base/pull/9)
|
|
34
|
+
|
|
35
|
+
### Commits
|
|
36
|
+
|
|
37
|
+
- use safe-buffer [`193bbeb`](https://github.com/browserify/cipher-base/commit/193bbeb0d60ff206b072d4e18b32fcf150eb0fad)
|
|
38
|
+
- add MIT LICENSE [`a9fb6e3`](https://github.com/browserify/cipher-base/commit/a9fb6e316c25b25d2bd04fa5b6eb748318bdcb04)
|
|
39
|
+
- index: add missing Buffer.alloc [`2397a9e`](https://github.com/browserify/cipher-base/commit/2397a9e0db33b2f3d6abbd89f01db1c066804a91)
|
|
40
|
+
- rename README to README, add .gitignore [`9345e1d`](https://github.com/browserify/cipher-base/commit/9345e1d21fd10555bc4f39ccae5512ca0202c5f6)
|
|
41
|
+
|
|
42
|
+
## [v1.0.3](https://github.com/browserify/cipher-base/compare/v1.0.2...v1.0.3) - 2016-09-13
|
|
43
|
+
|
|
44
|
+
### Merged
|
|
45
|
+
|
|
46
|
+
- closure-compiler fix - final is a reserved word [`#4`](https://github.com/browserify/cipher-base/pull/4)
|
|
47
|
+
|
|
48
|
+
## [v1.0.2](https://github.com/browserify/cipher-base/compare/v1.0.1...v1.0.2) - 2015-10-23
|
|
49
|
+
|
|
50
|
+
### Merged
|
|
51
|
+
|
|
52
|
+
- fix up typo in README [`#1`](https://github.com/browserify/cipher-base/pull/1)
|
|
53
|
+
|
|
54
|
+
### Commits
|
|
55
|
+
|
|
56
|
+
- Update api-methods. [`c4a7156`](https://github.com/browserify/cipher-base/commit/c4a7156c7beedb524ce5005374d2fd1327fa3ca4)
|
|
57
|
+
- travis [`a5873f7`](https://github.com/browserify/cipher-base/commit/a5873f7dbfe542d7ec28bcb3e306096d1d2b951c)
|
|
58
|
+
- Add api-methods [`208b338`](https://github.com/browserify/cipher-base/commit/208b33841d3e8a6f5322e54bdf442e1ee0d77590)
|
|
59
|
+
- Update error messages [`dc19a24`](https://github.com/browserify/cipher-base/commit/dc19a24119786518c1c835d948e36ddae3bf3adb)
|
|
60
|
+
|
|
61
|
+
## v1.0.1 - 2015-09-26
|
|
62
|
+
|
|
63
|
+
### Commits
|
|
64
|
+
|
|
65
|
+
- first [`8fbd9e7`](https://github.com/browserify/cipher-base/commit/8fbd9e7654d384b578e63d12e0311ae16dc07741)
|
|
66
|
+
- fix error in 0.10 [`61491fe`](https://github.com/browserify/cipher-base/commit/61491fe31fcc9bee0901f93b26cee6eaaca07575)
|
|
@@ -1,99 +1,167 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Buffer = require('safe-buffer').Buffer;
|
|
4
|
+
var Transform = require('stream').Transform;
|
|
5
|
+
var StringDecoder = require('string_decoder').StringDecoder;
|
|
6
|
+
var inherits = require('inherits');
|
|
7
|
+
|
|
8
|
+
function CipherBase(hashMode) {
|
|
9
|
+
Transform.call(this);
|
|
10
|
+
this.hashMode = typeof hashMode === 'string';
|
|
11
|
+
if (this.hashMode) {
|
|
12
|
+
this[hashMode] = this._finalOrDigest;
|
|
13
|
+
} else {
|
|
14
|
+
this['final'] = this._finalOrDigest;
|
|
15
|
+
}
|
|
16
|
+
if (this._final) {
|
|
17
|
+
this.__final = this._final;
|
|
18
|
+
this._final = null;
|
|
19
|
+
}
|
|
20
|
+
this._decoder = null;
|
|
21
|
+
this._encoding = null;
|
|
20
22
|
}
|
|
21
|
-
inherits(CipherBase, Transform)
|
|
23
|
+
inherits(CipherBase, Transform);
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
var useUint8Array = typeof Uint8Array !== 'undefined';
|
|
26
|
+
var useArrayBuffer = typeof ArrayBuffer !== 'undefined'
|
|
27
|
+
&& typeof Uint8Array !== 'undefined'
|
|
28
|
+
&& ArrayBuffer.isView
|
|
29
|
+
&& (Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT);
|
|
30
|
+
|
|
31
|
+
function toBuffer(data, encoding) {
|
|
32
|
+
/*
|
|
33
|
+
* No need to do anything for exact instance
|
|
34
|
+
* This is only valid when safe-buffer.Buffer === buffer.Buffer, i.e. when Buffer.from/Buffer.alloc existed
|
|
35
|
+
*/
|
|
36
|
+
if (data instanceof Buffer) {
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Convert strings to Buffer
|
|
41
|
+
if (typeof data === 'string') {
|
|
42
|
+
return Buffer.from(data, encoding);
|
|
43
|
+
}
|
|
27
44
|
|
|
28
|
-
|
|
29
|
-
|
|
45
|
+
/*
|
|
46
|
+
* Wrap any TypedArray instances and DataViews
|
|
47
|
+
* Makes sense only on engines with full TypedArray support -- let Buffer detect that
|
|
48
|
+
*/
|
|
49
|
+
if (useArrayBuffer && ArrayBuffer.isView(data)) {
|
|
50
|
+
// Bug in Node.js <6.3.1, which treats this as out-of-bounds
|
|
51
|
+
if (data.byteLength === 0) {
|
|
52
|
+
return Buffer.alloc(0);
|
|
53
|
+
}
|
|
30
54
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
55
|
+
var res = Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
56
|
+
/*
|
|
57
|
+
* Recheck result size, as offset/length doesn't work on Node.js <5.10
|
|
58
|
+
* We just go to Uint8Array case if this fails
|
|
59
|
+
*/
|
|
60
|
+
if (res.byteLength === data.byteLength) {
|
|
61
|
+
return res;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
34
64
|
|
|
35
|
-
|
|
65
|
+
/*
|
|
66
|
+
* Uint8Array in engines where Buffer.from might not work with ArrayBuffer, just copy over
|
|
67
|
+
* Doesn't make sense with other TypedArray instances
|
|
68
|
+
*/
|
|
69
|
+
if (useUint8Array && data instanceof Uint8Array) {
|
|
70
|
+
return Buffer.from(data);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/*
|
|
74
|
+
* Old Buffer polyfill on an engine that doesn't have TypedArray support
|
|
75
|
+
* Also, this is from a different Buffer polyfill implementation then we have, as instanceof check failed
|
|
76
|
+
* Convert to our current Buffer implementation
|
|
77
|
+
*/
|
|
78
|
+
if (
|
|
79
|
+
Buffer.isBuffer(data)
|
|
80
|
+
&& data.constructor
|
|
81
|
+
&& typeof data.constructor.isBuffer === 'function'
|
|
82
|
+
&& data.constructor.isBuffer(data)
|
|
83
|
+
) {
|
|
84
|
+
return Buffer.from(data);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.');
|
|
36
88
|
}
|
|
37
89
|
|
|
38
|
-
CipherBase.prototype.
|
|
90
|
+
CipherBase.prototype.update = function (data, inputEnc, outputEnc) {
|
|
91
|
+
var bufferData = toBuffer(data, inputEnc); // asserts correct input type
|
|
92
|
+
var outData = this._update(bufferData);
|
|
93
|
+
if (this.hashMode) {
|
|
94
|
+
return this;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
if (outputEnc) {
|
|
98
|
+
outData = this._toString(outData, outputEnc);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
return outData;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
CipherBase.prototype.setAutoPadding = function () {};
|
|
39
105
|
CipherBase.prototype.getAuthTag = function () {
|
|
40
|
-
|
|
41
|
-
}
|
|
106
|
+
throw new Error('trying to get auth tag in unsupported state');
|
|
107
|
+
};
|
|
42
108
|
|
|
43
109
|
CipherBase.prototype.setAuthTag = function () {
|
|
44
|
-
|
|
45
|
-
}
|
|
110
|
+
throw new Error('trying to set auth tag in unsupported state');
|
|
111
|
+
};
|
|
46
112
|
|
|
47
113
|
CipherBase.prototype.setAAD = function () {
|
|
48
|
-
|
|
49
|
-
}
|
|
114
|
+
throw new Error('trying to set aad in unsupported state');
|
|
115
|
+
};
|
|
50
116
|
|
|
51
117
|
CipherBase.prototype._transform = function (data, _, next) {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
118
|
+
var err;
|
|
119
|
+
try {
|
|
120
|
+
if (this.hashMode) {
|
|
121
|
+
this._update(data);
|
|
122
|
+
} else {
|
|
123
|
+
this.push(this._update(data));
|
|
124
|
+
}
|
|
125
|
+
} catch (e) {
|
|
126
|
+
err = e;
|
|
127
|
+
} finally {
|
|
128
|
+
next(err);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
65
131
|
CipherBase.prototype._flush = function (done) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
132
|
+
var err;
|
|
133
|
+
try {
|
|
134
|
+
this.push(this.__final());
|
|
135
|
+
} catch (e) {
|
|
136
|
+
err = e;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
done(err);
|
|
140
|
+
};
|
|
75
141
|
CipherBase.prototype._finalOrDigest = function (outputEnc) {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
142
|
+
var outData = this.__final() || Buffer.alloc(0);
|
|
143
|
+
if (outputEnc) {
|
|
144
|
+
outData = this._toString(outData, outputEnc, true);
|
|
145
|
+
}
|
|
146
|
+
return outData;
|
|
147
|
+
};
|
|
82
148
|
|
|
83
149
|
CipherBase.prototype._toString = function (value, enc, fin) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
150
|
+
if (!this._decoder) {
|
|
151
|
+
this._decoder = new StringDecoder(enc);
|
|
152
|
+
this._encoding = enc;
|
|
153
|
+
}
|
|
88
154
|
|
|
89
|
-
|
|
155
|
+
if (this._encoding !== enc) {
|
|
156
|
+
throw new Error('can’t switch encodings');
|
|
157
|
+
}
|
|
90
158
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
159
|
+
var out = this._decoder.write(value);
|
|
160
|
+
if (fin) {
|
|
161
|
+
out += this._decoder.end();
|
|
162
|
+
}
|
|
95
163
|
|
|
96
|
-
|
|
97
|
-
}
|
|
164
|
+
return out;
|
|
165
|
+
};
|
|
98
166
|
|
|
99
|
-
module.exports = CipherBase
|
|
167
|
+
module.exports = CipherBase;
|
|
@@ -1,32 +1,62 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
"name": "cipher-base",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "abstract base class for crypto-streams",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
8
|
+
"prepublishOnly": "safe-publish-latest",
|
|
9
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
10
|
+
"lint": "eslint --ext=js,.mjs .",
|
|
11
|
+
"pretest": "npm run lint",
|
|
12
|
+
"test": "npm run tests-only",
|
|
13
|
+
"tests-only": "tape 'test/**/*.js'",
|
|
14
|
+
"posttest": "npx npm@'>=10.2' audit --production",
|
|
15
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
16
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/crypto-browserify/cipher-base.git"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"cipher",
|
|
24
|
+
"stream"
|
|
25
|
+
],
|
|
26
|
+
"author": "Calvin Metcalf <calvin.metcalf@gmail.com>",
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/crypto-browserify/cipher-base/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/crypto-browserify/cipher-base#readme",
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"inherits": "^2.0.4",
|
|
34
|
+
"safe-buffer": "^5.2.1"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
38
|
+
"auto-changelog": "^2.5.0",
|
|
39
|
+
"encoding": "^0.1.13",
|
|
40
|
+
"eslint": "=8.8.0",
|
|
41
|
+
"in-publish": "^2.0.1",
|
|
42
|
+
"npmignore": "^0.3.1",
|
|
43
|
+
"safe-publish-latest": "^2.0.0",
|
|
44
|
+
"tape": "^5.9.0"
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"ignore": [
|
|
48
|
+
".github/workflows"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"auto-changelog": {
|
|
52
|
+
"output": "CHANGELOG.md",
|
|
53
|
+
"template": "keepachangelog",
|
|
54
|
+
"unreleased": false,
|
|
55
|
+
"commitLimit": false,
|
|
56
|
+
"backfillLimit": false,
|
|
57
|
+
"hideCredit": true
|
|
58
|
+
},
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">= 0.10"
|
|
61
|
+
}
|
|
32
62
|
}
|