private static byte[] decrypt(byte[] src, byte[] key) throws RuntimeException {
        try {
            //		DES算法要求有一个可信任的随机数源
            SecureRandom sr = new SecureRandom();
            // 从原始密匙数据创建一个DESKeySpec对象
            DESKeySpec dks = new DESKeySpec(key);
            // 创建一个密匙工厂，然后用它把DESKeySpec对象转换成
            // 一个SecretKey对象
            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
            SecretKey securekey = keyFactory.generateSecret(dks);
            // Cipher对象实际完成解密操作
            Cipher cipher = Cipher.getInstance(DES);
            // 用密匙初始化Cipher对象
            cipher.init(Cipher.DECRYPT_MODE, securekey, sr);
            // 现在，获取数据并解密
            // 正式执行解密操作
            return cipher.doFinal(src);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
private static byte[] decrypt(byte[] src, byte[] key) throws RuntimeException {
        try {
            
            SecureRandom sr = new SecureRandom();
            
            DESKeySpec dks = new DESKeySpec(key);
            
            
            SecretKeyFactory keyFactory = SecretKeyFactory.getInstance(DES);
            SecretKey securekey = keyFactory.generateSecret(dks);
            
            Cipher cipher = Cipher.getInstance(DES);
            
            cipher.init(Cipher.DECRYPT_MODE, securekey, sr);
            
            
            return cipher.doFinal(src);
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
private static byte [ ] decrypt ( byte [ ] src , byte [ ] key ) throws RuntimeException { try { //		DES算法要求有一个可信任的随机数源 SecureRandom sr = new SecureRandom ( ) ; // 从原始密匙数据创建一个DESKeySpec对象 DESKeySpec dks = new DESKeySpec ( key ) ; // 创建一个密匙工厂，然后用它把DESKeySpec对象转换成 // 一个SecretKey对象 SecretKeyFactory keyFactory = SecretKeyFactory . getInstance ( DES ) ; SecretKey securekey = keyFactory . generateSecret ( dks ) ; // Cipher对象实际完成解密操作 Cipher cipher = Cipher . getInstance ( DES ) ; // 用密匙初始化Cipher对象 cipher . init ( Cipher . DECRYPT_MODE , securekey , sr ) ; // 现在，获取数据并解密 // 正式执行解密操作 return cipher . doFinal ( src ) ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } }
decrypt

@param src ciphertext
@param key Key.
@return Plaintext
@throws RuntimeException cuowu
decrypt