node crypto解密小程序手机号报错是为什么?

错误信息:(每次都说第一次报错,第二次在执行就好了好神奇)

Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
at Decipheriv.final (internal/crypto/cipher.js:164:28)
at WXBizDataCrypt.decryptData (/Users/zhangye/Desktop/chanjet/darwin-front-server/app/service/darwinApp/WXBizDataCrypt.js:20:25)
at RegisterService.jiemi (/Users/zhangye/Desktop/chanjet/darwin-front-server/app/service/darwinApp/register.js:105:19)
at RegisterController.jiemi (/Users/zhangye/Desktop/chanjet/darwin-front-server/app/controller/darwinApp/register.js:20:53)
at Object.callFn (/Users/zhangye/Desktop/chanjet/darwin-front-server/node_modules/egg-core/lib/utils/index.js:44:21)
at Object.classControllerMiddleware (/Users/zhangye/Desktop/chanjet/darwin-front-server/node_modules/egg-core/lib/loader/mixin/controller.js:87:20)
at Object.callFn (/Users/zhangye/Desktop/chanjet/darwin-front-server/node_modules/@eggjs/router/lib/utils.js:12:21)
at wrappedController (/Users/zhangye/Desktop/chanjet/darwin-front-server/node_modules/@eggjs/router/lib/egg_router.js:322:18)
at dispatch (/Users/zhangye/Desktop/chanjet/darwin-front-server/node_modules/@eggjs/router/node_modules/koa-compose/index.js:44:32)

image.png

阅读 2.2k
1 个回答
新手上路,请多包涵

应该是code导致的session——key不一致

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题