收藏
回答

开发者工具怎么调试一物一码的场景?

提供了1124的进入场景,但启动参数要怎么设置?P.URL.CN/0P$M%LZ4LHSVSDCR2L2 我只有这个信息啊?????难道要我填

code_ticket

???

回答关注问题邀请回答
收藏

2 个回答

  • cover
    cover
    2019-09-23

    这边想了解下这里调试一物一码的场景,需要启动参数做什么哈?

    2019-09-23
    有用
    回复 2
    • Susu
      Susu
      2019-09-23
      我每个一物一码的产品是不一样的啊,需要code_ticket去换code
      2019-09-23
      回复
    • 张朝
      张朝
      2019-10-30回复Susu
      大佬在不在?解密二维码数据需要帮助
      2019-10-30
      回复
  • 张朝
    张朝
    2019-10-29

    请问下,我们这边使用java 解密二维码数据,提示下面这个错误,能分享下您这边解密二维码的流程和代码吗?感谢

    function jiemi(body) {
        var iv = 'vrZI0rRZJ85PFLVS' // 一物一码的秘钥
        var clearEncoding = 'utf8'
        var cipherEncoding = 'base64'
        var key = 'vrZI0rRZJ85PFLVS'
        var cipherChunks = []
        var decipher = crypto.createDecipheriv('aes-128-cbc', key, iv)
        cipherChunks.push(decipher.update(body, cipherEncoding, clearEncoding))
        cipherChunks.push(decipher.final(clearEncoding))
        var decryption = cipherChunks.join('')
        return decryption
    }
    let content = jsonfile.readFileSync(file)
    let bitmap = content.buffer;
    let jie = jiemi(bitmap)
    console.log(jie)
    fs.writeFileSync('data.txt', jie);


    Java:

    public void jiemi(byte[] buffer, String key, String iv) throws Exception {
         byte[] keyBytes = Base64.decodeBase64(key.getBytes("UTF-8"));
         int base = 16;
         if (keyBytes.length % base != 0) {
             int groups = keyBytes.length / base + (keyBytes.length % base != 0 ? 1 : 0);
             byte[] temp = new byte[groups * base];
             Arrays.fill(temp, (byte) 0);
             System.arraycopy(keyBytes, 0, temp, 0, keyBytes.length);
             keyBytes = temp;
         }
     
         byte[] encrypted1 = Base64.decodeBase64(buffer);//先用base64解密
         Security.addProvider(new BouncyCastleProvider());
         SecretKeySpec secretKeySpec = new SecretKeySpec(keyBytes, "AES");
         Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding", "BC");
         IvParameterSpec ivP = new IvParameterSpec(iv.getBytes("UTF-8"));
         if (StringUtils.isEmpty(iv)) {
             cipher.init(Cipher.DECRYPT_MODE, secretKeySpec);
         } else {
             cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, ivP);
         }
         byte[] result = cipher.doFinal(encrypted1);
     
         System.out.println(new String(result));
     }



    2019-10-29
    有用
    回复 1
    • Susu
      Susu
      2020-07-24
      我是搞前端的,不懂后台,不要意思啊
      2020-07-24
      回复
登录 后发表内容
问题标签