摘要:
enc = Cipher.getInstance("DES/CBC/PKCS5Padding"); keySpec = new SecretKeySpec(key, "DES");//key ivSpec = new IvParameterSpec(iv);//iv enc.init(Cipher.ENCRYPT_MODE, keySpec, ivSpec); enc.doFinal(indata);//encryptDES可以有这几种模式: Electronic Codebook (ECB) , Cipher Block Chaining (CBC) 阅读全文