Files
energy_app/README.md
T
jiangyinzhi 04f0606430 能效诊断
2024-07-10 10:25:32 +08:00

1.1 KiB

xtkb-app

测试环境加密修改

'pwd-restclient' 库 timeformatter

export function encryptStr(dataSource) {
  var seid = faultylabsMD5(Math.random() + '')
  seid = seid.substring(11, 27).toLowerCase()
  var sid = faultylabsMD5(seid)
  var sm2Modulus = sid.substring(11, 27).toLowerCase()
  //构建时间戳
  //   debugger
  var timestamp = Date.parse(new Date()) + ''
  //使用数据+时间戳充当摘要盐值;
  var salt = '{' + dataSource + '}' + '{' + timestamp + '}'
  //SM3摘要加密
  var deg = SG_sm3encrypt(salt)
  var ciphertext = SG_sm4encrypt(salt + '&&' + deg, '40jny6ut8i0sj3cz')
  var retValue = ciphertext + 'xtkb' + seid
  //console.log(retValue);
  return retValue
}
export function decryptStr(dataSource) {
  return SG_sm4decrypt(dataSource, '40jny6ut8i0sj3cz')
}

Project setup

yarn install

Compiles and hot-reloads for development

yarn serve

Compiles and minifies for production

yarn build

Lints and fixes files

yarn lint

Customize configuration

See Configuration Reference.