public static String decryptByDES(SecretKey key, String sInfo) {
		// 定义 加密算法,
		String algorithm = "DES";
		// 加密随机数生成器 (RNG)
		SecureRandom sr = new SecureRandom();
		byte[] cipherByte = null;
		try {
			// 得到加密/解密器
			Cipher c1 = Cipher.getInstance(algorithm);
			// 用指定的密钥和模式初始化Cipher对象
			c1.init(Cipher.DECRYPT_MODE, key, sr);
			// 对要解密的内容进行编码处理
			cipherByte = c1.doFinal(hex2byte(sInfo));
		} catch (Exception e) {
			e.printStackTrace();
		}
		// return byte2hex(cipherByte);
		return new String(cipherByte);
	}
public static String decryptByDES ( SecretKey key , String sInfo ) { String algorithm = "DES" ; SecureRandom sr = new SecureRandom ( ) ; byte [ ] cipherByte = null ; try { Cipher c1 = Cipher . getInstance ( algorithm ) ; c1 . init ( Cipher . DECRYPT_MODE , key , sr ) ; cipherByte = c1 . doFinal ( hex2byte ( sInfo ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } return new String ( cipherByte ) ; }
根据密匙进行DES解密

@param key
密匙
@param sInfo
要解密的密文
@return String 返回解密后信息