From 952e21feb8f01ae71f1ae11a9f9d72f28a613d00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=89=AF?= <841369634@qq.com> Date: Wed, 20 Nov 2024 10:07:15 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BE=9D=E8=B5=96=20crypto-j?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/mitmproxy/package.json | 3 --- packages/mitmproxy/test/sha256Test.js | 13 +++++++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/mitmproxy/package.json b/packages/mitmproxy/package.json index 29657e9..eb3afe6 100644 --- a/packages/mitmproxy/package.json +++ b/packages/mitmproxy/package.json @@ -25,8 +25,5 @@ "stream-throttle": "^0.1.3", "through2": "^4.0.2", "tunnel-agent": "^0.6.0" - }, - "devDependencies": { - "crypto-js": "^4.2.0" } } diff --git a/packages/mitmproxy/test/sha256Test.js b/packages/mitmproxy/test/sha256Test.js index 3c4d799..739d44a 100644 --- a/packages/mitmproxy/test/sha256Test.js +++ b/packages/mitmproxy/test/sha256Test.js @@ -1,5 +1,10 @@ -const CryptoJs = require('crypto-js') +// 需要时,在 package.json 中添加以下依赖: +// "devDependencies": { +// "crypto-js": "^4.2.0" +// } -const ret = CryptoJs.SHA256('111111111111') -console.log(ret.toString(CryptoJs.enc.Base64)) -console.log(1 / 2) +// const CryptoJs = require('crypto-js') +// +// const ret = CryptoJs.SHA256('111111111111') +// console.log(ret.toString(CryptoJs.enc.Base64)) +// console.log(1 / 2)