密钥长度错误(必须8字符)

id key length
RangeError: Invalid key length

1、Invalid key length

RG3.PF.Utilities.Services.DesService data:OwYNEt8mR/Vm3jsRlbucIrf2owId1fxe1H7+V0jCVVaWyNVPoD95aW4N6nFvZlNRNkgi3mB/+dQ=;key:smdcm8;vi:0 Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: Invalid key length
RangeError: Invalid key length
    at Decipheriv.createCipherBase (node:internal/crypto/cipher:116:19)
    at Decipheriv.createCipherWithIV (node:internal/crypto/cipher:135:3)
    at new Decipheriv (node:internal/crypto/cipher:289:3)
    at Object.createDecipheriv (node:crypto:146:10)
    at decrypt (D:\0_RG\Code\RG6.PF\rg3-pf\RG3.Web.Host.PaaS\AppNodeJs\Plugins\app_crypto.js:49:31)
    at C:\Users\clqzc\AppData\Local\Temp\zjtjtt4b.ivy:166:18
    at IncomingMessage.<anonymous> (C:\Users\clqzc\AppData\Local\Temp\zjtjtt4b.ivy:186:37)
    at IncomingMessage.emit (node:events:538:35)
    at endReadableNT (node:internal/streams/readabl

2、EVP_DecryptFinal_ex:bad decrypt

2023-04-06 19:59:48 EROR RG3.PF.Utilities.Services.DesService data:OwYNEt8mR/VBwzNCCQJtfbXZpO6ghVDtDsYGot0vh46lT7/4UBi70haPp2P6xJp/qxrwN/WmcQI=;key:smdcm123;vi:0 Microsoft.AspNetCore.NodeServices.HostingModels.NodeInvocationException: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt
    at Decipheriv.final (node:internal/crypto/cipher:193:29)
    at decrypt (D:\0_RG\Code\RG6.PF\rg3-pf\RG3.Web.Host.PaaS\AppNodeJs\Plugins\app_crypto.js:52:25)
    at C:\Users\clqzc\AppData\Local\Temp\rq5k5mrw.z0w:166:18
    at IncomingMessage.<anonymous> (C:\Users\clqzc\AppData\Local\Temp\rq5k5mrw.z0w:186:37)
    at IncomingMessage.emit (node:events:538:35)
    at endReadableNT (node:internal/streams/readable:1345:12)

接口服务配置文件修改(改成8位)(改后重启接口服务)

C:\0_RG\Code\RG6.PF\rg3-pf\RG3.Web.Host.PaaS\Config\AppAuth\smdcm\app_security.Production.json
C:\0_RG\Code\RG6.PF\rg3-pf\RG3.Web.Host.PaaS\Config\AppAuth\smdcm\app_security.json

前端环境变量修改(改成8位)(改后重启前端)

C:\0_RG\Code\rg3-cli.env.production-smdcm
C:\0_RG\Code\rg3-cli.env.production-smdcm-app
C:\0_RG\Code\rg3-cli.env.production-smdcm-local
C:\0_RG\Code\rg3-cli.env.development-smdcm
C:\0_RG\Code\rg3-cli.env.development-smdcm-cdn

前端环境变量修改(改成8位)(反密码设置)

C:\0_RG\Code\rg3-cli\public\config\smdcm\app.navs.js

文档更新时间: 2023-06-12 09:46   作者:admin