Security.addProvider(new com.sun.crypto.provider.SunJCE());
Key key = new SecretKeySpec(secretKey.getBytes(), "DES");

encryptCipher = Cipher.getInstance("DES");
encryptCipher.init(Cipher.ENCRYPT_MODE, key); 
8个密钥字符串,3des是最少是16个密钥字符串。这个是关键。
基本思路:签约号取后10位+yyMMdd 16位作为des密钥,生成密钥的话就是8个密钥串。

相关文章:

  • 2022-12-23
  • 2021-06-14
  • 2021-12-04
  • 2022-02-22
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
猜你喜欢
  • 2021-04-09
  • 2021-06-13
  • 2021-11-01
  • 2021-05-31
  • 2021-10-22
  • 2021-07-26
  • 2021-12-30
相关资源
相似解决方案