我已经在magento和node js中创建了登录服务。在magento中,如果客户使用密码注册,则使用md5盐密钥值对密码进行加密。如果我使用crypto node js模块来解密magento密码,它会抛出错误。
Error: Unknown cipher
at Error (native)
at new Decipher (crypto.js:210:16)
at Object.Decipher (crypto.js:207:12)
at D:\Workspace\mobileapp\routes\users.js:30:24
at Layer.handle [as handle_request] (D:\Workspace\mobileapp\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (D:\Workspace\mobileapp\node_modules\express\lib\router\index.js:312:13)
at D:\Workspace\mobileapp\node_modules\express\lib\router\index.js:280:7
at param (D:\Workspace\mobileapp\node_modules\express\lib\router\index.js:349:14)只有解密magento密码,我才能验证我的登录密码是否匹配,然后才能继续。我尝试加密我的节点js登录密码,但密码不匹配..
发布于 2019-11-02 10:45:09
如果客户使用密码注册,则使用md5盐密钥值对密码进行加密。
这里有很多东西需要拆开。
如果我使用加密节点js模块来解密magento密码,它会抛出错误。
你不能解密MD5,因为MD5不是加密的。
MD5是一个散列函数。散列函数不是加密的。
哈希函数是加密的!但并不是所有的密码算法都是加密的。
https://stackoverflow.com/questions/34042229
复制相似问题