收藏
回答

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

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

code_ticket

???

最后一次编辑于  09-23
回答关注问题邀请回答
收藏

2 个回答

  • cover
    cover
    09-23

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

    09-23
    赞同
    回复 2
    • Susu
      Susu
      09-23
      我每个一物一码的产品是不一样的啊,需要code_ticket去换code
      09-23
      回复
    • Sam.Zhang
      Sam.Zhang
      10-30回复Susu
      大佬在不在?解密二维码数据需要帮助
      10-30
      回复
  • Sam.Zhang
    Sam.Zhang
    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));
     }



    10-29
    赞同
    回复
问题标签