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,221 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Buffer = require('safe-buffer').Buffer;
|
|
4
|
+
var CipherBase = require('../');
|
|
5
|
+
|
|
6
|
+
var test = require('tape');
|
|
7
|
+
var inherits = require('inherits');
|
|
8
|
+
|
|
9
|
+
test('basic version', function (t) {
|
|
10
|
+
function Cipher() {
|
|
11
|
+
CipherBase.call(this);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
inherits(Cipher, CipherBase);
|
|
15
|
+
|
|
16
|
+
Cipher.prototype._update = function (input) {
|
|
17
|
+
t.ok(Buffer.isBuffer(input));
|
|
18
|
+
return input;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
Cipher.prototype._final = function () {
|
|
22
|
+
// noop
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
var cipher = new Cipher();
|
|
26
|
+
var utf8 = 'abc123abcd';
|
|
27
|
+
var update = cipher.update(utf8, 'utf8', 'base64') + cipher['final']('base64');
|
|
28
|
+
var string = Buffer.from(update, 'base64').toString();
|
|
29
|
+
|
|
30
|
+
t.equals(utf8, string);
|
|
31
|
+
|
|
32
|
+
t.end();
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
test('hash mode', function (t) {
|
|
36
|
+
function Cipher() {
|
|
37
|
+
CipherBase.call(this, 'finalName');
|
|
38
|
+
this._cache = [];
|
|
39
|
+
}
|
|
40
|
+
inherits(Cipher, CipherBase);
|
|
41
|
+
Cipher.prototype._update = function (input) {
|
|
42
|
+
t.ok(Buffer.isBuffer(input));
|
|
43
|
+
this._cache.push(input);
|
|
44
|
+
};
|
|
45
|
+
Cipher.prototype._final = function () {
|
|
46
|
+
return Buffer.concat(this._cache);
|
|
47
|
+
};
|
|
48
|
+
var cipher = new Cipher();
|
|
49
|
+
var utf8 = 'abc123abcd';
|
|
50
|
+
var update = cipher.update(utf8, 'utf8').finalName('base64');
|
|
51
|
+
var string = Buffer.from(update, 'base64').toString();
|
|
52
|
+
|
|
53
|
+
t.equals(utf8, string);
|
|
54
|
+
|
|
55
|
+
t.end();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
test('hash mode as stream', function (t) {
|
|
59
|
+
function Cipher() {
|
|
60
|
+
CipherBase.call(this, 'finalName');
|
|
61
|
+
this._cache = [];
|
|
62
|
+
}
|
|
63
|
+
inherits(Cipher, CipherBase);
|
|
64
|
+
Cipher.prototype._update = function (input) {
|
|
65
|
+
t.ok(Buffer.isBuffer(input));
|
|
66
|
+
this._cache.push(input);
|
|
67
|
+
};
|
|
68
|
+
Cipher.prototype._final = function () {
|
|
69
|
+
return Buffer.concat(this._cache);
|
|
70
|
+
};
|
|
71
|
+
var cipher = new Cipher();
|
|
72
|
+
cipher.on('error', function (e) {
|
|
73
|
+
t.notOk(e);
|
|
74
|
+
});
|
|
75
|
+
var utf8 = 'abc123abcd';
|
|
76
|
+
cipher.end(utf8, 'utf8');
|
|
77
|
+
var update = cipher.read().toString('base64');
|
|
78
|
+
var string = Buffer.from(update, 'base64').toString();
|
|
79
|
+
|
|
80
|
+
t.equals(utf8, string);
|
|
81
|
+
|
|
82
|
+
t.end();
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
test('encodings', function (t) {
|
|
86
|
+
function Cipher() {
|
|
87
|
+
CipherBase.call(this);
|
|
88
|
+
}
|
|
89
|
+
inherits(Cipher, CipherBase);
|
|
90
|
+
|
|
91
|
+
Cipher.prototype._update = function (input) {
|
|
92
|
+
return input;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
Cipher.prototype._final = function () {
|
|
96
|
+
// noop
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
t.test('mix and match encoding', function (st) {
|
|
100
|
+
st.plan(2);
|
|
101
|
+
|
|
102
|
+
var cipher = new Cipher();
|
|
103
|
+
cipher.update('foo', 'utf8', 'utf8');
|
|
104
|
+
|
|
105
|
+
st['throws'](function () {
|
|
106
|
+
cipher.update('foo', 'utf8', 'base64');
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
cipher = new Cipher();
|
|
110
|
+
cipher.update('foo', 'utf8', 'base64');
|
|
111
|
+
|
|
112
|
+
st.doesNotThrow(function () {
|
|
113
|
+
cipher.update('foo', 'utf8');
|
|
114
|
+
cipher['final']('base64');
|
|
115
|
+
});
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
t.test('handle long uft8 plaintexts', function (st) {
|
|
119
|
+
st.plan(1);
|
|
120
|
+
var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん';
|
|
121
|
+
|
|
122
|
+
var cipher = new Cipher();
|
|
123
|
+
var decipher = new Cipher();
|
|
124
|
+
var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8');
|
|
125
|
+
enc += decipher.update(cipher['final']('base64'), 'base64', 'utf8');
|
|
126
|
+
enc += decipher['final']('utf8');
|
|
127
|
+
|
|
128
|
+
st.equals(txt, enc);
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
test('handle SafeBuffer instances', function (t) {
|
|
133
|
+
function Cipher() {
|
|
134
|
+
CipherBase.call(this, 'finalName');
|
|
135
|
+
this._cache = [];
|
|
136
|
+
}
|
|
137
|
+
inherits(Cipher, CipherBase);
|
|
138
|
+
Cipher.prototype._update = function (input) {
|
|
139
|
+
t.ok(Buffer.isBuffer(input));
|
|
140
|
+
this._cache.push(input);
|
|
141
|
+
};
|
|
142
|
+
Cipher.prototype._final = function () {
|
|
143
|
+
return Buffer.concat(this._cache);
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
var cipher = new Cipher();
|
|
147
|
+
var final = cipher.update(Buffer.from('a0c1', 'hex')).finalName('hex');
|
|
148
|
+
t.equals(final, 'a0c1');
|
|
149
|
+
|
|
150
|
+
t.end();
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
test('handle Uint8Array view', function (t) {
|
|
154
|
+
function Cipher() {
|
|
155
|
+
CipherBase.call(this, 'finalName');
|
|
156
|
+
this._cache = [];
|
|
157
|
+
}
|
|
158
|
+
inherits(Cipher, CipherBase);
|
|
159
|
+
Cipher.prototype._update = function (input) {
|
|
160
|
+
t.ok(Buffer.isBuffer(input));
|
|
161
|
+
this._cache.push(input);
|
|
162
|
+
};
|
|
163
|
+
Cipher.prototype._final = function () {
|
|
164
|
+
return Buffer.concat(this._cache);
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
var buf = new Uint8Array([0, 1, 2, 3, 4, 5]);
|
|
168
|
+
var uarr = new Uint8Array(buf.buffer, 2, 3);
|
|
169
|
+
|
|
170
|
+
var cipher = new Cipher();
|
|
171
|
+
var final = cipher.update(uarr).finalName('hex');
|
|
172
|
+
t.equals(final, '020304');
|
|
173
|
+
|
|
174
|
+
t.end();
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
test('handle empty Uint8Array instances', function (t) {
|
|
178
|
+
function Cipher() {
|
|
179
|
+
CipherBase.call(this, 'finalName');
|
|
180
|
+
this._cache = [];
|
|
181
|
+
}
|
|
182
|
+
inherits(Cipher, CipherBase);
|
|
183
|
+
Cipher.prototype._update = function (input) {
|
|
184
|
+
t.ok(Buffer.isBuffer(input));
|
|
185
|
+
this._cache.push(input);
|
|
186
|
+
};
|
|
187
|
+
Cipher.prototype._final = function () {
|
|
188
|
+
return Buffer.concat(this._cache);
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
var cipher = new Cipher();
|
|
192
|
+
var final = cipher.update(new Uint8Array(0)).finalName('hex');
|
|
193
|
+
t.equals(final, '');
|
|
194
|
+
|
|
195
|
+
t.end();
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
test('handle UInt16Array', function (t) {
|
|
199
|
+
function Cipher() {
|
|
200
|
+
CipherBase.call(this, 'finalName');
|
|
201
|
+
this._cache = [];
|
|
202
|
+
}
|
|
203
|
+
inherits(Cipher, CipherBase);
|
|
204
|
+
Cipher.prototype._update = function (input) {
|
|
205
|
+
t.ok(Buffer.isBuffer(input));
|
|
206
|
+
this._cache.push(input);
|
|
207
|
+
};
|
|
208
|
+
Cipher.prototype._final = function () {
|
|
209
|
+
return Buffer.concat(this._cache);
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
if (ArrayBuffer.isView && (Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT)) {
|
|
213
|
+
var cipher = new Cipher();
|
|
214
|
+
var final = cipher.update(new Uint16Array([1234, 512])).finalName('hex');
|
|
215
|
+
t.equals(final, 'd2040002');
|
|
216
|
+
} else {
|
|
217
|
+
t.skip('ArrayBuffer.isView and/or TypedArray not fully supported');
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
t.end();
|
|
221
|
+
});
|
|
@@ -74,6 +74,10 @@ DES.prototype._update = function _update(inp, inOff, out, outOff) {
|
|
|
74
74
|
};
|
|
75
75
|
|
|
76
76
|
DES.prototype._pad = function _pad(buffer, off) {
|
|
77
|
+
if (this.padding === false) {
|
|
78
|
+
return false;
|
|
79
|
+
}
|
|
80
|
+
|
|
77
81
|
var value = buffer.length - off;
|
|
78
82
|
for (var i = off; i < buffer.length; i++)
|
|
79
83
|
buffer[i] = value;
|
|
@@ -82,6 +86,10 @@ DES.prototype._pad = function _pad(buffer, off) {
|
|
|
82
86
|
};
|
|
83
87
|
|
|
84
88
|
DES.prototype._unpad = function _unpad(buffer) {
|
|
89
|
+
if (this.padding === false) {
|
|
90
|
+
return buffer;
|
|
91
|
+
}
|
|
92
|
+
|
|
85
93
|
var pad = buffer[buffer.length - 1];
|
|
86
94
|
for (var i = buffer.length - pad; i < buffer.length; i++)
|
|
87
95
|
assert.equal(buffer[i], pad);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "des.js",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "DES implementation",
|
|
5
5
|
"main": "lib/des.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"test": "mocha --reporter=spec test/*-test.js
|
|
7
|
+
"test": "NODE_OPTIONS=--openssl-legacy-provider mocha --reporter=spec test/*-test.js"
|
|
8
8
|
},
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
@@ -23,9 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://github.com/indutny/des.js#readme",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"jscs": "^3.0.7",
|
|
27
26
|
"jshint": "^2.8.0",
|
|
28
|
-
"mocha": "^
|
|
27
|
+
"mocha": "^10.2.0"
|
|
29
28
|
},
|
|
30
29
|
"dependencies": {
|
|
31
30
|
"inherits": "^2.0.1",
|
|
@@ -44,16 +44,16 @@ describe('DES-CBC', function() {
|
|
|
44
44
|
|
|
45
45
|
vectors.forEach(function(vec, i) {
|
|
46
46
|
it('should encrypt vector ' + i, function() {
|
|
47
|
-
var key =
|
|
48
|
-
var iv =
|
|
49
|
-
var input =
|
|
47
|
+
var key = Buffer.from(vec.key, 'hex');
|
|
48
|
+
var iv = Buffer.from(vec.iv, 'hex');
|
|
49
|
+
var input = Buffer.from(vec.input, 'hex');
|
|
50
50
|
|
|
51
51
|
var enc = CBC.create({
|
|
52
52
|
type: 'encrypt',
|
|
53
53
|
key: key,
|
|
54
54
|
iv: iv
|
|
55
55
|
});
|
|
56
|
-
var out =
|
|
56
|
+
var out = Buffer.from(enc.update(input).concat(enc.final()));
|
|
57
57
|
|
|
58
58
|
var cipher = crypto.createCipheriv('des-cbc', key, iv);
|
|
59
59
|
var expected = Buffer.concat([ cipher.update(input), cipher.final() ]);
|
|
@@ -65,7 +65,7 @@ describe('DES-CBC', function() {
|
|
|
65
65
|
key: key,
|
|
66
66
|
iv: iv
|
|
67
67
|
});
|
|
68
|
-
assert.deepEqual(
|
|
68
|
+
assert.deepEqual(Buffer.from(dec.update(out).concat(dec.final())),
|
|
69
69
|
input);
|
|
70
70
|
});
|
|
71
71
|
});
|
|
@@ -84,8 +84,8 @@ describe('DES', function() {
|
|
|
84
84
|
|
|
85
85
|
vectors.forEach(function(vec, i) {
|
|
86
86
|
it('should encrypt vector ' + i, function() {
|
|
87
|
-
var key =
|
|
88
|
-
var input =
|
|
87
|
+
var key = Buffer.from(vec.key, 'hex');
|
|
88
|
+
var input = Buffer.from(vec.input, 'hex');
|
|
89
89
|
|
|
90
90
|
var enc = des.DES.create({
|
|
91
91
|
type: 'encrypt',
|
|
@@ -95,23 +95,23 @@ describe('DES', function() {
|
|
|
95
95
|
type: 'decrypt',
|
|
96
96
|
key: key
|
|
97
97
|
});
|
|
98
|
-
var out =
|
|
98
|
+
var out = Buffer.from(enc.update(input).concat(enc.final()));
|
|
99
99
|
|
|
100
|
-
var cipher = crypto.createCipheriv('des-ecb', key,
|
|
100
|
+
var cipher = crypto.createCipheriv('des-ecb', key, Buffer.alloc(0));
|
|
101
101
|
var expected = Buffer.concat([ cipher.update(input), cipher.final() ]);
|
|
102
102
|
|
|
103
103
|
assert.deepEqual(out, expected);
|
|
104
104
|
|
|
105
|
-
assert.deepEqual(
|
|
105
|
+
assert.deepEqual(Buffer.from(dec.update(out).concat(dec.final())),
|
|
106
106
|
input);
|
|
107
107
|
});
|
|
108
108
|
});
|
|
109
109
|
|
|
110
110
|
it('should buffer during encryption/decryption', function() {
|
|
111
|
-
var key =
|
|
112
|
-
var chunk =
|
|
111
|
+
var key = Buffer.from('0102030405060708', 'hex');
|
|
112
|
+
var chunk = Buffer.from('01020304050607', 'hex');
|
|
113
113
|
var count = 257;
|
|
114
|
-
var expected =
|
|
114
|
+
var expected = Buffer.from(
|
|
115
115
|
new Array(count + 1).join('01020304050607'), 'hex');
|
|
116
116
|
|
|
117
117
|
var enc = des.DES.create({
|
|
@@ -132,7 +132,7 @@ describe('DES', function() {
|
|
|
132
132
|
out = out.concat(dec.update(cipher.slice(i * 7, (i + 1) * 7)));
|
|
133
133
|
out = out.concat(dec.final(cipher.slice(i * 7)));
|
|
134
134
|
|
|
135
|
-
out =
|
|
135
|
+
out = Buffer.from(out);
|
|
136
136
|
assert.deepEqual(out, expected);
|
|
137
137
|
});
|
|
138
138
|
});
|
|
@@ -42,18 +42,18 @@ describe('DES-EDE-CBC', function() {
|
|
|
42
42
|
}
|
|
43
43
|
];
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
vectors.forEach(function(vec, i) {
|
|
46
46
|
it('should encrypt vector ' + i, function() {
|
|
47
|
-
var key =
|
|
48
|
-
var iv =
|
|
49
|
-
var input =
|
|
47
|
+
var key = Buffer.from(vec.key, 'hex');
|
|
48
|
+
var iv = Buffer.from(vec.iv, 'hex');
|
|
49
|
+
var input = Buffer.from(vec.input, 'hex');
|
|
50
50
|
|
|
51
51
|
var enc = CBC.create({
|
|
52
52
|
type: 'encrypt',
|
|
53
53
|
key: key,
|
|
54
54
|
iv: iv
|
|
55
55
|
});
|
|
56
|
-
var out =
|
|
56
|
+
var out = Buffer.from(enc.update(input).concat(enc.final()));
|
|
57
57
|
|
|
58
58
|
var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv);
|
|
59
59
|
var expected = Buffer.concat([ cipher.update(input), cipher.final() ]);
|
|
@@ -65,9 +65,42 @@ describe('DES-EDE-CBC', function() {
|
|
|
65
65
|
key: key,
|
|
66
66
|
iv: iv
|
|
67
67
|
});
|
|
68
|
-
assert.deepEqual(
|
|
68
|
+
assert.deepEqual(Buffer.from(dec.update(out).concat(dec.final())),
|
|
69
69
|
input);
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
|
+
vectors.forEach(function(vec, i) {
|
|
73
|
+
it('should decrypt without unpadding vector ' + i, function() {
|
|
74
|
+
var key = Buffer.from(vec.key, 'hex');
|
|
75
|
+
var iv = Buffer.from(vec.iv, 'hex');
|
|
76
|
+
var input = Buffer.from(vec.input, 'hex');
|
|
77
|
+
|
|
78
|
+
var enc = CBC.create({
|
|
79
|
+
type: 'encrypt',
|
|
80
|
+
key: key,
|
|
81
|
+
iv: iv,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
var out = Buffer.from(enc.update(input).concat(enc.final()));
|
|
85
|
+
|
|
86
|
+
var cipher = crypto.createCipheriv('des-ede3-cbc', key, iv);
|
|
87
|
+
var expected = Buffer.concat([ cipher.update(input), cipher.final() ]);
|
|
88
|
+
|
|
89
|
+
assert.deepEqual(out, expected);
|
|
90
|
+
|
|
91
|
+
var dec = CBC.create({
|
|
92
|
+
type: 'decrypt',
|
|
93
|
+
key: key,
|
|
94
|
+
iv: iv,
|
|
95
|
+
padding: false
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
var decipher = crypto.createDecipheriv('des-ede3-cbc', key, iv);
|
|
99
|
+
decipher.setAutoPadding(false);
|
|
100
|
+
expected = Buffer.concat([ decipher.update(out), decipher.final() ]);
|
|
101
|
+
assert.deepEqual(Buffer.from(dec.update(out).concat(dec.final())),
|
|
102
|
+
Buffer.from(expected));
|
|
103
|
+
});
|
|
104
|
+
});
|
|
72
105
|
});
|
|
73
106
|
});
|
|
@@ -452,16 +452,16 @@
|
|
|
452
452
|
var w = this.words[i];
|
|
453
453
|
var word = (((w << off) | carry) & 0xffffff).toString(16);
|
|
454
454
|
carry = (w >>> (24 - off)) & 0xffffff;
|
|
455
|
-
if (carry !== 0 || i !== this.length - 1) {
|
|
456
|
-
out = zeros[6 - word.length] + word + out;
|
|
457
|
-
} else {
|
|
458
|
-
out = word + out;
|
|
459
|
-
}
|
|
460
455
|
off += 2;
|
|
461
456
|
if (off >= 26) {
|
|
462
457
|
off -= 26;
|
|
463
458
|
i--;
|
|
464
459
|
}
|
|
460
|
+
if (carry !== 0 || i !== this.length - 1) {
|
|
461
|
+
out = zeros[6 - word.length] + word + out;
|
|
462
|
+
} else {
|
|
463
|
+
out = word + out;
|
|
464
|
+
}
|
|
465
465
|
}
|
|
466
466
|
if (carry !== 0) {
|
|
467
467
|
out = carry.toString(16) + out;
|
|
@@ -1921,6 +1921,7 @@
|
|
|
1921
1921
|
this.words[i] = carry;
|
|
1922
1922
|
this.length++;
|
|
1923
1923
|
}
|
|
1924
|
+
this.length = num === 0 ? 1 : this.length;
|
|
1924
1925
|
|
|
1925
1926
|
return this;
|
|
1926
1927
|
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// NOTE: This could be potentionally used to generate loop-less multiplications
|
|
4
|
+
function genCombMulTo (alen, blen) {
|
|
5
|
+
var len = alen + blen - 1;
|
|
6
|
+
var src = [
|
|
7
|
+
'var a = self.words;',
|
|
8
|
+
'var b = num.words;',
|
|
9
|
+
'var o = out.words;',
|
|
10
|
+
'var c = 0;',
|
|
11
|
+
'var lo;',
|
|
12
|
+
'var mid;',
|
|
13
|
+
'var hi;'
|
|
14
|
+
];
|
|
15
|
+
for (var i = 0; i < alen; i++) {
|
|
16
|
+
src.push('var a' + i + ' = a[' + i + '] | 0;');
|
|
17
|
+
src.push('var al' + i + ' = a' + i + ' & 0x1fff;');
|
|
18
|
+
src.push('var ah' + i + ' = a' + i + ' >>> 13;');
|
|
19
|
+
}
|
|
20
|
+
for (i = 0; i < blen; i++) {
|
|
21
|
+
src.push('var b' + i + ' = b[' + i + '] | 0;');
|
|
22
|
+
src.push('var bl' + i + ' = b' + i + ' & 0x1fff;');
|
|
23
|
+
src.push('var bh' + i + ' = b' + i + ' >>> 13;');
|
|
24
|
+
}
|
|
25
|
+
src.push('');
|
|
26
|
+
src.push('out.negative = self.negative ^ num.negative;');
|
|
27
|
+
src.push('out.length = ' + len + ';');
|
|
28
|
+
|
|
29
|
+
for (var k = 0; k < len; k++) {
|
|
30
|
+
var minJ = Math.max(0, k - alen + 1);
|
|
31
|
+
var maxJ = Math.min(k, blen - 1);
|
|
32
|
+
|
|
33
|
+
src.push('\/* k = ' + k + ' *\/');
|
|
34
|
+
src.push('var w' + k + ' = c;');
|
|
35
|
+
src.push('c = 0;');
|
|
36
|
+
for (var j = minJ; j <= maxJ; j++) {
|
|
37
|
+
i = k - j;
|
|
38
|
+
|
|
39
|
+
src.push('lo = Math.imul(al' + i + ', bl' + j + ');');
|
|
40
|
+
src.push('mid = Math.imul(al' + i + ', bh' + j + ');');
|
|
41
|
+
src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;');
|
|
42
|
+
src.push('hi = Math.imul(ah' + i + ', bh' + j + ');');
|
|
43
|
+
|
|
44
|
+
src.push('w' + k + ' = (w' + k + ' + lo) | 0;');
|
|
45
|
+
src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;');
|
|
46
|
+
src.push('c = (c + hi) | 0;');
|
|
47
|
+
src.push('c = (c + (mid >>> 13)) | 0;');
|
|
48
|
+
src.push('c = (c + (w' + k + ' >>> 26)) | 0;');
|
|
49
|
+
src.push('w' + k + ' &= 0x3ffffff;');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Store in separate step for better memory access
|
|
53
|
+
for (k = 0; k < len; k++) {
|
|
54
|
+
src.push('o[' + k + '] = w' + k + ';');
|
|
55
|
+
}
|
|
56
|
+
src.push('if (c !== 0) {',
|
|
57
|
+
' o[' + k + '] = c;',
|
|
58
|
+
' out.length++;',
|
|
59
|
+
'}',
|
|
60
|
+
'return out;');
|
|
61
|
+
|
|
62
|
+
return src.join('\n');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log(genCombMulTo(10, 10));
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function genCombMulTo (alen, blen) {
|
|
4
|
+
var len = alen + blen - 1;
|
|
5
|
+
var src = [
|
|
6
|
+
'var a = self.words;',
|
|
7
|
+
'var b = num.words;',
|
|
8
|
+
'var o = out.words;',
|
|
9
|
+
'var c = 0;',
|
|
10
|
+
'var lo;',
|
|
11
|
+
'var mid;',
|
|
12
|
+
'var hi;'
|
|
13
|
+
];
|
|
14
|
+
for (var i = 0; i < alen; i++) {
|
|
15
|
+
src.push('var a' + i + ' = a[' + i + '] | 0;');
|
|
16
|
+
src.push('var al' + i + ' = a' + i + ' & 0x1fff;');
|
|
17
|
+
src.push('var ah' + i + ' = a' + i + ' >>> 13;');
|
|
18
|
+
}
|
|
19
|
+
for (i = 0; i < blen; i++) {
|
|
20
|
+
src.push('var b' + i + ' = b[' + i + '] | 0;');
|
|
21
|
+
src.push('var bl' + i + ' = b' + i + ' & 0x1fff;');
|
|
22
|
+
src.push('var bh' + i + ' = b' + i + ' >>> 13;');
|
|
23
|
+
}
|
|
24
|
+
src.push('');
|
|
25
|
+
src.push('out.negative = self.negative ^ num.negative;');
|
|
26
|
+
src.push('out.length = ' + len + ';');
|
|
27
|
+
|
|
28
|
+
for (var k = 0; k < len; k++) {
|
|
29
|
+
var minJ = Math.max(0, k - alen + 1);
|
|
30
|
+
var maxJ = Math.min(k, blen - 1);
|
|
31
|
+
|
|
32
|
+
src.push('\/* k = ' + k + ' *\/');
|
|
33
|
+
src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');');
|
|
34
|
+
src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');');
|
|
35
|
+
src.push(
|
|
36
|
+
'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;');
|
|
37
|
+
src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');');
|
|
38
|
+
|
|
39
|
+
for (var j = minJ + 1; j <= maxJ; j++) {
|
|
40
|
+
i = k - j;
|
|
41
|
+
|
|
42
|
+
src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;');
|
|
43
|
+
src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;');
|
|
44
|
+
src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;');
|
|
45
|
+
src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;');
|
|
49
|
+
src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;');
|
|
50
|
+
src.push('w' + k + ' &= 0x3ffffff;');
|
|
51
|
+
}
|
|
52
|
+
// Store in separate step for better memory access
|
|
53
|
+
for (k = 0; k < len; k++) {
|
|
54
|
+
src.push('o[' + k + '] = w' + k + ';');
|
|
55
|
+
}
|
|
56
|
+
src.push('if (c !== 0) {',
|
|
57
|
+
' o[' + k + '] = c;',
|
|
58
|
+
' out.length++;',
|
|
59
|
+
'}',
|
|
60
|
+
'return out;');
|
|
61
|
+
|
|
62
|
+
return src.join('\n');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log(genCombMulTo(10, 10));
|
|
@@ -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/dunder-proto
|
|
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,24 @@
|
|
|
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.1](https://github.com/es-shims/dunder-proto/compare/v1.0.0...v1.0.1) - 2024-12-16
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] do not crash when `--disable-proto=throw` [`6c367d9`](https://github.com/es-shims/dunder-proto/commit/6c367d919bc1604778689a297bbdbfea65752847)
|
|
13
|
+
- [Tests] ensure noproto tests only use the current version of dunder-proto [`b02365b`](https://github.com/es-shims/dunder-proto/commit/b02365b9cf889c4a2cac7be0c3cfc90a789af36c)
|
|
14
|
+
- [Dev Deps] update `@arethetypeswrong/cli`, `@types/tape` [`e3c5c3b`](https://github.com/es-shims/dunder-proto/commit/e3c5c3bd81cf8cef7dff2eca19e558f0e307f666)
|
|
15
|
+
- [Deps] update `call-bind-apply-helpers` [`19f1da0`](https://github.com/es-shims/dunder-proto/commit/19f1da028b8dd0d05c85bfd8f7eed2819b686450)
|
|
16
|
+
|
|
17
|
+
## v1.0.0 - 2024-12-06
|
|
18
|
+
|
|
19
|
+
### Commits
|
|
20
|
+
|
|
21
|
+
- Initial implementation, tests, readme, types [`a5b74b0`](https://github.com/es-shims/dunder-proto/commit/a5b74b0082f5270cb0905cd9a2e533cee7498373)
|
|
22
|
+
- Initial commit [`73fb5a3`](https://github.com/es-shims/dunder-proto/commit/73fb5a353b51ac2ab00c9fdeb0114daffd4c07a8)
|
|
23
|
+
- npm init [`80152dc`](https://github.com/es-shims/dunder-proto/commit/80152dc98155da4eb046d9f67a87ed96e8280a1d)
|
|
24
|
+
- Only apps should have lockfiles [`03e6660`](https://github.com/es-shims/dunder-proto/commit/03e6660a1d70dc401f3e217a031475ec537243dd)
|
package/node_modules/{@meteorjs/crypto-browserify/node_modules/hash-base → dunder-proto}/LICENSE
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 ECMAScript Shims
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
9
9
|
copies of the Software, and to permit persons to whom the Software is
|
|
10
10
|
furnished to do so, subject to the following conditions:
|
|
11
11
|
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
14
|
|
|
15
15
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
16
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
17
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
18
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|