Code example for DESedeKeySpec

0
     * @throws Exception  
     */   
    public static byte[] desEncodeECB(byte[] key, byte[] data)  
            throws Exception {   
        Key deskey = null;  
        DESedeKeySpec spec = new DESedeKeySpec(key);  
        SecretKeyFactory keyfactory = SecretKeyFactory.getInstance("desede");  
        deskey = keyfactory.generateSecret(spec);  
        Cipher cipher = Cipher.getInstance("desede" + "/ECB/NoPadding");  
        cipher.init(Cipher.ENCRYPT_MODE, deskey);  
        byte[] bOut = cipher.doFinal(data);  
        return bOut;  
    }   
    /**  
     * ECB解密,不要IV  
     * @param key 密钥  
     * @param data Base64编码的密文  
     * @return 明文  
     * @throws Exception  
     */   
    public static byte[] desDecodeECB(byte[] key, byte[] data)