crypto.createECDH 未添加到 webpack

crypto.createECDH is not getting added with webpack

我想使用nodejs中加密模块提供的createECDH函数。我下载了所有依赖项。 Webpack 没有在我生成的 javascript 文件中添加 createECDH 函数。如何使用节点中可用的加密的 createECDH 函数。

它添加了许多函数,如 createCipher、createDechiper、createDiffihelman、listCiphers、getCiphers 等

可能您使用的是旧版本的加密库。根据 docs,ECDH class 是在 v0.11.14 中添加的,晚于您提到的其他功能。

很高兴看到你的代码。