fluid-ws-java-client/src/main/java/com/fluidbpm/ws/client/v1/user/AES256Local.java
public static byte[] decrypt(byte[] keyParam, byte[] dataToDecryptParam, byte[] ivParam) {

        Key key = new SecretKeySpec(keyParam, KEY_ALGO);

        try {
            Cipher cipher = Cipher.getInstance(ALGO_CBC);
            cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(ivParam));

            return cipher.doFinal(dataToDecryptParam);
        }
        //Changed for Java 1.6 compatibility...
        catch (InvalidKeyException except) {

            throw new FluidClientException("Key: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (InvalidAlgorithmParameterException except) {

            throw new FluidClientException("Algo: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (IllegalBlockSizeException except) {

            throw new FluidClientException("Block: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (NoSuchPaddingException except) {

            throw new FluidClientException("NoPadding: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (NoSuchAlgorithmException except) {

            throw new FluidClientException("NoAlgo: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (BadPaddingException except) {

            throw new FluidClientException("BadPadding: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        }
    }
public static byte[] decrypt(byte[] keyParam, byte[] dataToDecryptParam, byte[] ivParam) {

        Key key = new SecretKeySpec(keyParam, KEY_ALGO);

        try {
            Cipher cipher = Cipher.getInstance(ALGO_CBC);
            cipher.init(Cipher.DECRYPT_MODE, key, new IvParameterSpec(ivParam));

            return cipher.doFinal(dataToDecryptParam);
        }
        //Changed for Java 1.6 compatibility...
        catch (InvalidKeyException except) {

            throw new FluidClientException("Key: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (InvalidAlgorithmParameterException except) {

            throw new FluidClientException("Algo: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (IllegalBlockSizeException except) {

            throw new FluidClientException("Block: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (NoSuchPaddingException except) {

            throw new FluidClientException("NoPadding: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (NoSuchAlgorithmException except) {

            throw new FluidClientException("NoAlgo: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        } catch (BadPaddingException except) {

            throw new FluidClientException("BadPadding: Unable to decrypt data. " +
                    except.getMessage(), except, FluidClientException.ErrorCode.AES_256);
        }
    }
public static byte [ ] decrypt ( byte [ ] keyParam , byte [ ] dataToDecryptParam , byte [ ] ivParam ) { Key key = new SecretKeySpec ( keyParam , KEY_ALGO ) ; try { Cipher cipher = Cipher . getInstance ( ALGO_CBC ) ; cipher . init ( Cipher . DECRYPT_MODE , key , new IvParameterSpec ( ivParam ) ) ; return cipher . doFinal ( dataToDecryptParam ) ; } //Changed for Java 1.6 compatibility... catch ( InvalidKeyException except ) { throw new FluidClientException ( "Key: Unable to decrypt data. " + except . getMessage ( ) , except , FluidClientException . ErrorCode . AES_256 ) ; } catch ( InvalidAlgorithmParameterException except ) { throw new FluidClientException ( "Algo: Unable to decrypt data. " + except . getMessage ( ) , except , FluidClientException . ErrorCode . AES_256 ) ; } catch ( IllegalBlockSizeException except ) { throw new FluidClientException ( "Block: Unable to decrypt data. " + except . getMessage ( ) , except , FluidClientException . ErrorCode . AES_256 ) ; } catch ( NoSuchPaddingException except ) { throw new FluidClientException ( "NoPadding: Unable to decrypt data. " + except . getMessage ( ) , except , FluidClientException . ErrorCode . AES_256 ) ; } catch ( NoSuchAlgorithmException except ) { throw new FluidClientException ( "NoAlgo: Unable to decrypt data. " + except . getMessage ( ) , except , FluidClientException . ErrorCode . AES_256 ) ; } catch ( BadPaddingException except ) { throw new FluidClientException ( "BadPadding: Unable to decrypt data. " + except . getMessage ( ) , except , FluidClientException . ErrorCode . AES_256 ) ; } }
Decrypt {@code dataToDecryptParam} using the {@code keyParam} key.

@param keyParam The symmetric key.
@param dataToDecryptParam The encrypted data to decrypt.
@param ivParam The random IV.
@return Clear text.
Decrypt { @code dataToDecryptParam } using the { @code keyParam } key .