byte[] (byte[] password, byte[] encryptedData) { try { Cipher c = Cipher.getInstance(ENCRYPT_DATA_ALGORITHM); c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(password, SECRET_KEY_ALGORITHM), CBC_SALT_DATA); return c.doFinal(encryptedData); } catch (Exception e) { throw new IllegalStateException(ENCRYPT_DATA_ALGORITHM + " is not available", e); } }