移除依赖 crypto-js

master
王良 5 days ago
parent 112997c217
commit 952e21feb8

@ -25,8 +25,5 @@
"stream-throttle": "^0.1.3", "stream-throttle": "^0.1.3",
"through2": "^4.0.2", "through2": "^4.0.2",
"tunnel-agent": "^0.6.0" "tunnel-agent": "^0.6.0"
},
"devDependencies": {
"crypto-js": "^4.2.0"
} }
} }

@ -1,5 +1,10 @@
const CryptoJs = require('crypto-js') // 需要时,在 package.json 中添加以下依赖:
// "devDependencies": {
// "crypto-js": "^4.2.0"
// }
const ret = CryptoJs.SHA256('111111111111') // const CryptoJs = require('crypto-js')
console.log(ret.toString(CryptoJs.enc.Base64)) //
console.log(1 / 2) // const ret = CryptoJs.SHA256('111111111111')
// console.log(ret.toString(CryptoJs.enc.Base64))
// console.log(1 / 2)

Loading…
Cancel
Save