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
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "bn.js",
|
|
3
|
-
"version": "5.2.1",
|
|
4
|
-
"description": "Big number implementation in pure javascript",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"BN",
|
|
7
|
-
"Big number",
|
|
8
|
-
"BigNum",
|
|
9
|
-
"Modulo",
|
|
10
|
-
"Montgomery"
|
|
11
|
-
],
|
|
12
|
-
"homepage": "https://github.com/indutny/bn.js",
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/indutny/bn.js/issues"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "git@github.com:indutny/bn.js"
|
|
19
|
-
},
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"author": "Fedor Indutny <fedor@indutny.com>",
|
|
22
|
-
"files": [
|
|
23
|
-
"lib/bn.js"
|
|
24
|
-
],
|
|
25
|
-
"main": "lib/bn.js",
|
|
26
|
-
"browser": {
|
|
27
|
-
"buffer": false
|
|
28
|
-
},
|
|
29
|
-
"scripts": {
|
|
30
|
-
"lint": "standardx",
|
|
31
|
-
"test": "npm run lint && npm run unit",
|
|
32
|
-
"unit": "mocha --reporter=spec test/*-test.js"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"eslint-plugin-es5": "^1.5.0",
|
|
36
|
-
"mocha": "^8.3.0",
|
|
37
|
-
"standardx": "^7.0.0"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016 Kirill Fomichev
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
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
|
-
THE SOFTWARE.
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# hash-base
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.org/package/hash-base)
|
|
4
|
-
[](https://travis-ci.org/crypto-browserify/hash-base)
|
|
5
|
-
[](https://david-dm.org/crypto-browserify/hash-base#info=dependencies)
|
|
6
|
-
|
|
7
|
-
Abstract base class to inherit from if you want to create streams implementing the same API as node crypto [Hash][1] (for [Cipher][2] / [Decipher][3] check [crypto-browserify/cipher-base][4]).
|
|
8
|
-
|
|
9
|
-
## Example
|
|
10
|
-
|
|
11
|
-
```js
|
|
12
|
-
const HashBase = require('hash-base');
|
|
13
|
-
const inherits = require('inherits');
|
|
14
|
-
|
|
15
|
-
// our hash function is XOR sum of all bytes
|
|
16
|
-
function MyHash () {
|
|
17
|
-
HashBase.call(this, 1); // in bytes
|
|
18
|
-
|
|
19
|
-
this._sum = 0x00;
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
inherits(MyHash, HashBase)
|
|
23
|
-
|
|
24
|
-
MyHash.prototype._update = function () {
|
|
25
|
-
for (let i = 0; i < this._block.length; ++i) {
|
|
26
|
-
this._sum ^= this._block[i];
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
MyHash.prototype._digest = function () {
|
|
31
|
-
return this._sum;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
const data = Buffer.from([0x00, 0x42, 0x01]);
|
|
35
|
-
const hash = new MyHash().update(data).digest();
|
|
36
|
-
console.log(hash); // => 67
|
|
37
|
-
```
|
|
38
|
-
You also can check [source code](index.js) or [crypto-browserify/md5.js][5]
|
|
39
|
-
|
|
40
|
-
## LICENSE
|
|
41
|
-
|
|
42
|
-
MIT
|
|
43
|
-
|
|
44
|
-
[1]: https://nodejs.org/api/crypto.html#crypto_class_hash
|
|
45
|
-
[2]: https://nodejs.org/api/crypto.html#crypto_class_cipher
|
|
46
|
-
[3]: https://nodejs.org/api/crypto.html#crypto_class_decipher
|
|
47
|
-
[4]: https://github.com/crypto-browserify/cipher-base
|
|
48
|
-
[5]: https://github.com/crypto-browserify/md5.js
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var Buffer = require('safe-buffer').Buffer
|
|
3
|
-
var Transform = require('stream').Transform
|
|
4
|
-
var inherits = require('inherits')
|
|
5
|
-
|
|
6
|
-
function HashBase (blockSize) {
|
|
7
|
-
Transform.call(this)
|
|
8
|
-
|
|
9
|
-
this._block = Buffer.allocUnsafe(blockSize)
|
|
10
|
-
this._blockSize = blockSize
|
|
11
|
-
this._blockOffset = 0
|
|
12
|
-
this._length = [0, 0, 0, 0]
|
|
13
|
-
|
|
14
|
-
this._finalized = false
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
inherits(HashBase, Transform)
|
|
18
|
-
|
|
19
|
-
HashBase.prototype._transform = function (chunk, encoding, callback) {
|
|
20
|
-
var error = null
|
|
21
|
-
try {
|
|
22
|
-
this.update(chunk, encoding)
|
|
23
|
-
} catch (err) {
|
|
24
|
-
error = err
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
callback(error)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
HashBase.prototype._flush = function (callback) {
|
|
31
|
-
var error = null
|
|
32
|
-
try {
|
|
33
|
-
this.push(this.digest())
|
|
34
|
-
} catch (err) {
|
|
35
|
-
error = err
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
callback(error)
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
var useUint8Array = typeof Uint8Array !== 'undefined'
|
|
42
|
-
var useArrayBuffer = typeof ArrayBuffer !== 'undefined' &&
|
|
43
|
-
typeof Uint8Array !== 'undefined' &&
|
|
44
|
-
ArrayBuffer.isView &&
|
|
45
|
-
(Buffer.prototype instanceof Uint8Array || Buffer.TYPED_ARRAY_SUPPORT)
|
|
46
|
-
|
|
47
|
-
function toBuffer (data, encoding) {
|
|
48
|
-
// No need to do anything for exact instance
|
|
49
|
-
// This is only valid when safe-buffer.Buffer === buffer.Buffer, i.e. when Buffer.from/Buffer.alloc existed
|
|
50
|
-
if (data instanceof Buffer) return data
|
|
51
|
-
|
|
52
|
-
// Convert strings to Buffer
|
|
53
|
-
if (typeof data === 'string') return Buffer.from(data, encoding)
|
|
54
|
-
|
|
55
|
-
/*
|
|
56
|
-
* Wrap any TypedArray instances and DataViews
|
|
57
|
-
* Makes sense only on engines with full TypedArray support -- let Buffer detect that
|
|
58
|
-
*/
|
|
59
|
-
if (useArrayBuffer && ArrayBuffer.isView(data)) {
|
|
60
|
-
if (data.byteLength === 0) return Buffer.alloc(0) // Bug in Node.js <6.3.1, which treats this as out-of-bounds
|
|
61
|
-
var res = Buffer.from(data.buffer, data.byteOffset, data.byteLength)
|
|
62
|
-
// Recheck result size, as offset/length doesn't work on Node.js <5.10
|
|
63
|
-
// We just go to Uint8Array case if this fails
|
|
64
|
-
if (res.byteLength === data.byteLength) return res
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/*
|
|
68
|
-
* Uint8Array in engines where Buffer.from might not work with ArrayBuffer, just copy over
|
|
69
|
-
* Doesn't make sense with other TypedArray instances
|
|
70
|
-
*/
|
|
71
|
-
if (useUint8Array && data instanceof Uint8Array) return Buffer.from(data)
|
|
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.')
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
HashBase.prototype.update = function (data, encoding) {
|
|
91
|
-
if (this._finalized) throw new Error('Digest already called')
|
|
92
|
-
|
|
93
|
-
data = toBuffer(data, encoding) // asserts correct input type
|
|
94
|
-
|
|
95
|
-
// consume data
|
|
96
|
-
var block = this._block
|
|
97
|
-
var offset = 0
|
|
98
|
-
while (this._blockOffset + data.length - offset >= this._blockSize) {
|
|
99
|
-
for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
|
|
100
|
-
this._update()
|
|
101
|
-
this._blockOffset = 0
|
|
102
|
-
}
|
|
103
|
-
while (offset < data.length) block[this._blockOffset++] = data[offset++]
|
|
104
|
-
|
|
105
|
-
// update length
|
|
106
|
-
for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
|
|
107
|
-
this._length[j] += carry
|
|
108
|
-
carry = (this._length[j] / 0x0100000000) | 0
|
|
109
|
-
if (carry > 0) this._length[j] -= 0x0100000000 * carry
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
return this
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
HashBase.prototype._update = function () {
|
|
116
|
-
throw new Error('_update is not implemented')
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
HashBase.prototype.digest = function (encoding) {
|
|
120
|
-
if (this._finalized) throw new Error('Digest already called')
|
|
121
|
-
this._finalized = true
|
|
122
|
-
|
|
123
|
-
var digest = this._digest()
|
|
124
|
-
if (encoding !== undefined) digest = digest.toString(encoding)
|
|
125
|
-
|
|
126
|
-
// reset state
|
|
127
|
-
this._block.fill(0)
|
|
128
|
-
this._blockOffset = 0
|
|
129
|
-
for (var i = 0; i < 4; ++i) this._length[i] = 0
|
|
130
|
-
|
|
131
|
-
return digest
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
HashBase.prototype._digest = function () {
|
|
135
|
-
throw new Error('_digest is not implemented')
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
module.exports = HashBase
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hash-base",
|
|
3
|
-
"version": "3.0.5",
|
|
4
|
-
"description": "abstract base class for hash-streams",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"hash",
|
|
7
|
-
"stream"
|
|
8
|
-
],
|
|
9
|
-
"homepage": "https://github.com/crypto-browserify/hash-base",
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/crypto-browserify/hash-base/issues"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"author": "Kirill Fomichev <fanatid@ya.ru> (https://github.com/fanatid)",
|
|
15
|
-
"files": [
|
|
16
|
-
"index.js"
|
|
17
|
-
],
|
|
18
|
-
"main": "index.js",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/crypto-browserify/hash-base.git"
|
|
22
|
-
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"lint": "standard",
|
|
25
|
-
"pretest": "npm run lint",
|
|
26
|
-
"test": "npm run tests-only",
|
|
27
|
-
"tests-only": "nyc tape 'test/**/*.js'",
|
|
28
|
-
"posttest": "npx npm@'>=10.2' audit --production"
|
|
29
|
-
},
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"inherits": "^2.0.4",
|
|
32
|
-
"safe-buffer": "^5.2.1"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"nyc": "^10.3.2",
|
|
36
|
-
"standard": "^14.3.3",
|
|
37
|
-
"tape": "^5.9.0"
|
|
38
|
-
},
|
|
39
|
-
"engines": {
|
|
40
|
-
"node": ">= 0.10"
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
# hash-base
|
|
2
|
-
|
|
3
|
-
[](https://www.npmjs.org/package/hash-base)
|
|
4
|
-
[](https://travis-ci.org/crypto-browserify/hash-base)
|
|
5
|
-
[](https://david-dm.org/crypto-browserify/hash-base#info=dependencies)
|
|
6
|
-
|
|
7
|
-
[](https://github.com/feross/standard)
|
|
8
|
-
|
|
9
|
-
Abstract base class to inherit from if you want to create streams implementing the same API as node crypto [Hash][1] (for [Cipher][2] / [Decipher][3] check [crypto-browserify/cipher-base][4]).
|
|
10
|
-
|
|
11
|
-
## Example
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
const HashBase = require('hash-base')
|
|
15
|
-
const inherits = require('inherits')
|
|
16
|
-
|
|
17
|
-
// our hash function is XOR sum of all bytes
|
|
18
|
-
function MyHash () {
|
|
19
|
-
HashBase.call(this, 1) // in bytes
|
|
20
|
-
|
|
21
|
-
this._sum = 0x00
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
inherits(MyHash, HashBase)
|
|
25
|
-
|
|
26
|
-
MyHash.prototype._update = function () {
|
|
27
|
-
for (let i = 0; i < this._block.length; ++i) this._sum ^= this._block[i]
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
MyHash.prototype._digest = function () {
|
|
31
|
-
return this._sum
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const data = Buffer.from([ 0x00, 0x42, 0x01 ])
|
|
35
|
-
const hash = new MyHash().update(data).digest()
|
|
36
|
-
console.log(hash) // => 67
|
|
37
|
-
```
|
|
38
|
-
You also can check [source code](index.js) or [crypto-browserify/md5.js][5]
|
|
39
|
-
|
|
40
|
-
## LICENSE
|
|
41
|
-
|
|
42
|
-
MIT
|
|
43
|
-
|
|
44
|
-
[1]: https://nodejs.org/api/crypto.html#crypto_class_hash
|
|
45
|
-
[2]: https://nodejs.org/api/crypto.html#crypto_class_cipher
|
|
46
|
-
[3]: https://nodejs.org/api/crypto.html#crypto_class_decipher
|
|
47
|
-
[4]: https://github.com/crypto-browserify/cipher-base
|
|
48
|
-
[5]: https://github.com/crypto-browserify/md5.js
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
var Buffer = require('safe-buffer').Buffer
|
|
3
|
-
var Transform = require('stream').Transform
|
|
4
|
-
var inherits = require('inherits')
|
|
5
|
-
|
|
6
|
-
function throwIfNotStringOrBuffer (val, prefix) {
|
|
7
|
-
if (!Buffer.isBuffer(val) && typeof val !== 'string') {
|
|
8
|
-
throw new TypeError(prefix + ' must be a string or a buffer')
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function HashBase (blockSize) {
|
|
13
|
-
Transform.call(this)
|
|
14
|
-
|
|
15
|
-
this._block = Buffer.allocUnsafe(blockSize)
|
|
16
|
-
this._blockSize = blockSize
|
|
17
|
-
this._blockOffset = 0
|
|
18
|
-
this._length = [0, 0, 0, 0]
|
|
19
|
-
|
|
20
|
-
this._finalized = false
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
inherits(HashBase, Transform)
|
|
24
|
-
|
|
25
|
-
HashBase.prototype._transform = function (chunk, encoding, callback) {
|
|
26
|
-
var error = null
|
|
27
|
-
try {
|
|
28
|
-
this.update(chunk, encoding)
|
|
29
|
-
} catch (err) {
|
|
30
|
-
error = err
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
callback(error)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
HashBase.prototype._flush = function (callback) {
|
|
37
|
-
var error = null
|
|
38
|
-
try {
|
|
39
|
-
this.push(this.digest())
|
|
40
|
-
} catch (err) {
|
|
41
|
-
error = err
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
callback(error)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
HashBase.prototype.update = function (data, encoding) {
|
|
48
|
-
throwIfNotStringOrBuffer(data, 'Data')
|
|
49
|
-
if (this._finalized) throw new Error('Digest already called')
|
|
50
|
-
if (!Buffer.isBuffer(data)) data = Buffer.from(data, encoding)
|
|
51
|
-
|
|
52
|
-
// consume data
|
|
53
|
-
var block = this._block
|
|
54
|
-
var offset = 0
|
|
55
|
-
while (this._blockOffset + data.length - offset >= this._blockSize) {
|
|
56
|
-
for (var i = this._blockOffset; i < this._blockSize;) block[i++] = data[offset++]
|
|
57
|
-
this._update()
|
|
58
|
-
this._blockOffset = 0
|
|
59
|
-
}
|
|
60
|
-
while (offset < data.length) block[this._blockOffset++] = data[offset++]
|
|
61
|
-
|
|
62
|
-
// update length
|
|
63
|
-
for (var j = 0, carry = data.length * 8; carry > 0; ++j) {
|
|
64
|
-
this._length[j] += carry
|
|
65
|
-
carry = (this._length[j] / 0x0100000000) | 0
|
|
66
|
-
if (carry > 0) this._length[j] -= 0x0100000000 * carry
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return this
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
HashBase.prototype._update = function () {
|
|
73
|
-
throw new Error('_update is not implemented')
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
HashBase.prototype.digest = function (encoding) {
|
|
77
|
-
if (this._finalized) throw new Error('Digest already called')
|
|
78
|
-
this._finalized = true
|
|
79
|
-
|
|
80
|
-
var digest = this._digest()
|
|
81
|
-
if (encoding !== undefined) digest = digest.toString(encoding)
|
|
82
|
-
|
|
83
|
-
// reset state
|
|
84
|
-
this._block.fill(0)
|
|
85
|
-
this._blockOffset = 0
|
|
86
|
-
for (var i = 0; i < 4; ++i) this._length[i] = 0
|
|
87
|
-
|
|
88
|
-
return digest
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
HashBase.prototype._digest = function () {
|
|
92
|
-
throw new Error('_digest is not implemented')
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
module.exports = HashBase
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "hash-base",
|
|
3
|
-
"version": "3.0.4",
|
|
4
|
-
"description": "abstract base class for hash-streams",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"hash",
|
|
7
|
-
"stream"
|
|
8
|
-
],
|
|
9
|
-
"homepage": "https://github.com/crypto-browserify/hash-base",
|
|
10
|
-
"bugs": {
|
|
11
|
-
"url": "https://github.com/crypto-browserify/hash-base/issues"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"author": "Kirill Fomichev <fanatid@ya.ru> (https://github.com/fanatid)",
|
|
15
|
-
"files": [
|
|
16
|
-
"index.js"
|
|
17
|
-
],
|
|
18
|
-
"main": "index.js",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "https://github.com/crypto-browserify/hash-base.git"
|
|
22
|
-
},
|
|
23
|
-
"scripts": {
|
|
24
|
-
"coverage": "nyc node test/*.js",
|
|
25
|
-
"lint": "standard",
|
|
26
|
-
"test": "npm run lint && npm run unit",
|
|
27
|
-
"unit": "node test/*.js"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"inherits": "^2.0.1",
|
|
31
|
-
"safe-buffer": "^5.0.1"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"nyc": "^8.3.2",
|
|
35
|
-
"standard": "*",
|
|
36
|
-
"tape": "^4.2.0"
|
|
37
|
-
},
|
|
38
|
-
"engines": {
|
|
39
|
-
"node": ">=4"
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
coverage/
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
5.2.0 / 2021-02-23
|
|
2
|
-
------------------
|
|
3
|
-
|
|
4
|
-
- fix: Buffer not using global in browser (#260)
|
|
5
|
-
- Fix LE constructor for HEX (#265)
|
|
6
|
-
|
|
7
|
-
5.1.3 / 2020-08-14
|
|
8
|
-
------------------
|
|
9
|
-
|
|
10
|
-
- Add support for defined but not implemented Symbol.for (#252)
|
|
11
|
-
|
|
12
|
-
5.1.2 / 2020-05-20
|
|
13
|
-
------------------
|
|
14
|
-
|
|
15
|
-
- Fix BN v5/v4 interoperability issue (#249)
|
|
16
|
-
|
|
17
|
-
5.1.1 / 2019-12-24
|
|
18
|
-
------------------
|
|
19
|
-
|
|
20
|
-
- Temporary workaround for BN#_move (#236)
|
|
21
|
-
- Add eslintrc instead config in package.json (#237)
|
|
22
|
-
|
|
23
|
-
5.1.0 / 2019-12-23
|
|
24
|
-
------------------
|
|
25
|
-
|
|
26
|
-
- Benchmark for BigInt (#226)
|
|
27
|
-
- Add documentation for max/min (#232)
|
|
28
|
-
- Update BN#inspect for Symbols (#225)
|
|
29
|
-
- Improve performance of toArrayLike (#222)
|
|
30
|
-
- temporary disable jumboMulTo in BN#mulTo (#221)
|
|
31
|
-
- optimize toBitArray function (#212)
|
|
32
|
-
- fix iaddn sign issue (#216)
|
|
33
|
-
|
|
34
|
-
5.0.0 / 2019-07-04
|
|
35
|
-
------------------
|
|
36
|
-
|
|
37
|
-
- travis: update node versions (#205)
|
|
38
|
-
- Refactor buffer constructor (#200)
|
|
39
|
-
- lib: fix for negative numbers: imuln, modrn, idivn (#185)
|
|
40
|
-
- bn: fix Red#imod (#178)
|
|
41
|
-
- check unexpected high bits for invalid characters (#173)
|
|
42
|
-
- document support very large integers (#158)
|
|
43
|
-
- only define toBuffer if Buffer is defined (#172)
|
|
44
|
-
- lib: better validation of string input (#151)
|
|
45
|
-
- tests: reject decimal input in constructor (#91)
|
|
46
|
-
- bn: make .strip() an internal method (#105)
|
|
47
|
-
- lib: deprecate `.modn()` introduce `.modrn()` (#112 #129 #130)
|
|
48
|
-
- bn: don't accept invalid characters (#141)
|
|
49
|
-
- package: use `files` insteadof `.npmignore` (#152)
|
|
50
|
-
- bn: improve allocation speed for buffers (#167)
|
|
51
|
-
- toJSON to default to interoperable hex (length % 2) (#164)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
node_modules
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
var Buffer = require('safe-buffer').Buffer
|
|
2
|
-
var CipherBase = require('./')
|
|
3
|
-
|
|
4
|
-
var test = require('tape')
|
|
5
|
-
var inherits = require('inherits')
|
|
6
|
-
|
|
7
|
-
test('basic version', function (t) {
|
|
8
|
-
function Cipher () {
|
|
9
|
-
CipherBase.call(this)
|
|
10
|
-
}
|
|
11
|
-
inherits(Cipher, CipherBase)
|
|
12
|
-
Cipher.prototype._update = function (input) {
|
|
13
|
-
t.ok(Buffer.isBuffer(input))
|
|
14
|
-
return input
|
|
15
|
-
}
|
|
16
|
-
Cipher.prototype._final = function () {
|
|
17
|
-
// noop
|
|
18
|
-
}
|
|
19
|
-
var cipher = new Cipher()
|
|
20
|
-
var utf8 = 'abc123abcd'
|
|
21
|
-
var update = cipher.update(utf8, 'utf8', 'base64') + cipher.final('base64')
|
|
22
|
-
var string = (Buffer.from(update, 'base64')).toString()
|
|
23
|
-
t.equals(utf8, string)
|
|
24
|
-
t.end()
|
|
25
|
-
})
|
|
26
|
-
test('hash mode', function (t) {
|
|
27
|
-
function Cipher () {
|
|
28
|
-
CipherBase.call(this, 'finalName')
|
|
29
|
-
this._cache = []
|
|
30
|
-
}
|
|
31
|
-
inherits(Cipher, CipherBase)
|
|
32
|
-
Cipher.prototype._update = function (input) {
|
|
33
|
-
t.ok(Buffer.isBuffer(input))
|
|
34
|
-
this._cache.push(input)
|
|
35
|
-
}
|
|
36
|
-
Cipher.prototype._final = function () {
|
|
37
|
-
return Buffer.concat(this._cache)
|
|
38
|
-
}
|
|
39
|
-
var cipher = new Cipher()
|
|
40
|
-
var utf8 = 'abc123abcd'
|
|
41
|
-
var update = cipher.update(utf8, 'utf8').finalName('base64')
|
|
42
|
-
var string = (Buffer.from(update, 'base64')).toString()
|
|
43
|
-
|
|
44
|
-
t.equals(utf8, string)
|
|
45
|
-
t.end()
|
|
46
|
-
})
|
|
47
|
-
test('hash mode as stream', function (t) {
|
|
48
|
-
function Cipher () {
|
|
49
|
-
CipherBase.call(this, 'finalName')
|
|
50
|
-
this._cache = []
|
|
51
|
-
}
|
|
52
|
-
inherits(Cipher, CipherBase)
|
|
53
|
-
Cipher.prototype._update = function (input) {
|
|
54
|
-
t.ok(Buffer.isBuffer(input))
|
|
55
|
-
this._cache.push(input)
|
|
56
|
-
}
|
|
57
|
-
Cipher.prototype._final = function () {
|
|
58
|
-
return Buffer.concat(this._cache)
|
|
59
|
-
}
|
|
60
|
-
var cipher = new Cipher()
|
|
61
|
-
cipher.on('error', function (e) {
|
|
62
|
-
t.notOk(e)
|
|
63
|
-
})
|
|
64
|
-
var utf8 = 'abc123abcd'
|
|
65
|
-
cipher.end(utf8, 'utf8')
|
|
66
|
-
var update = cipher.read().toString('base64')
|
|
67
|
-
var string = (Buffer.from(update, 'base64')).toString()
|
|
68
|
-
|
|
69
|
-
t.equals(utf8, string)
|
|
70
|
-
t.end()
|
|
71
|
-
})
|
|
72
|
-
|
|
73
|
-
test('encodings', function (t) {
|
|
74
|
-
inherits(Cipher, CipherBase)
|
|
75
|
-
function Cipher () {
|
|
76
|
-
CipherBase.call(this)
|
|
77
|
-
}
|
|
78
|
-
Cipher.prototype._update = function (input) {
|
|
79
|
-
return input
|
|
80
|
-
}
|
|
81
|
-
Cipher.prototype._final = function () {
|
|
82
|
-
// noop
|
|
83
|
-
}
|
|
84
|
-
t.test('mix and match encoding', function (t) {
|
|
85
|
-
t.plan(2)
|
|
86
|
-
|
|
87
|
-
var cipher = new Cipher()
|
|
88
|
-
cipher.update('foo', 'utf8', 'utf8')
|
|
89
|
-
t.throws(function () {
|
|
90
|
-
cipher.update('foo', 'utf8', 'base64')
|
|
91
|
-
})
|
|
92
|
-
cipher = new Cipher()
|
|
93
|
-
cipher.update('foo', 'utf8', 'base64')
|
|
94
|
-
t.doesNotThrow(function () {
|
|
95
|
-
cipher.update('foo', 'utf8')
|
|
96
|
-
cipher.final('base64')
|
|
97
|
-
})
|
|
98
|
-
})
|
|
99
|
-
t.test('handle long uft8 plaintexts', function (t) {
|
|
100
|
-
t.plan(1)
|
|
101
|
-
var txt = 'ふっかつ あきる すぶり はやい つける まゆげ たんさん みんぞく ねほりはほり せまい たいまつばな ひはん'
|
|
102
|
-
|
|
103
|
-
var cipher = new Cipher()
|
|
104
|
-
var decipher = new Cipher()
|
|
105
|
-
var enc = decipher.update(cipher.update(txt, 'utf8', 'base64'), 'base64', 'utf8')
|
|
106
|
-
enc += decipher.update(cipher.final('base64'), 'base64', 'utf8')
|
|
107
|
-
enc += decipher.final('utf8')
|
|
108
|
-
|
|
109
|
-
t.equals(txt, enc)
|
|
110
|
-
})
|
|
111
|
-
})
|